opengl Topic is solved
opengl
Hi,
I have problems with linking my old opengl with new wxDev-c++, I have linked the following library libglu32.a.
[Linker Error] undefined reference to `wxGLCanvas::~wxGLCanvas()'
In previous version it was working.
Regards Andrej
I have problems with linking my old opengl with new wxDev-c++, I have linked the following library libglu32.a.
[Linker Error] undefined reference to `wxGLCanvas::~wxGLCanvas()'
In previous version it was working.
Regards Andrej
Re: opengl
It works with old wxwidgets 2.8.7
Re: opengl
Try doing a webupdate and grabbing the devpaks for gcc and common 2.8.12.2.
Let me know if that fixes it.
-Tony
Let me know if that fixes it.
-Tony
Everybody's got something to hide except for me and my monkey.
Re: opengl
I have instaled the library, this is UNICODE build, this is why I have a problem. I have changed the linking of library (added u to all wxwidgets libraries lwx*u), however I still get:
[Linker Error] undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)' and os on.
So how can I change the whole program to UNICODE? I am using default gcc compiler 3.4.5. Isnt this gcc ANSI type?
Thank and best regards
Andrej
[Linker Error] undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)' and os on.
So how can I change the whole program to UNICODE? I am using default gcc compiler 3.4.5. Isnt this gcc ANSI type?
Thank and best regards
Andrej
Re: opengl
Go to Project->Project Options->Parameters and in the "Preprocessor Definitions" box add the line:campa wrote:I have instaled the library, this is UNICODE build, this is why I have a problem. I have changed the linking of library (added u to all wxwidgets libraries lwx*u), however I still get:
[Linker Error] undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)' and os on.
So how can I change the whole program to UNICODE? I am using default gcc compiler 3.4.5. Isnt this gcc ANSI type?
Thank and best regards
Andrej
Code: Select all
_UNICODE
I've attached an OpenGL example project for wxDev-C++ 7.4. This works fine on my machine. And no, gcc 3.4.5 can handle ANSI and UNICODE just fine if you add the correct switch.
-Tony
- Attachments
-
- wxopengl_tut.7z
- OpenGL example for wxDev-C++ 7.4
- (5.5 KiB) Downloaded 130 times
Everybody's got something to hide except for me and my monkey.
Re: opengl
and after changing the linking libraries
from
-l$(WXLIBNAME)
-l$(WXLIBNAME)_gl
to
-l$(WXLIBNAME)u
-l$(WXLIBNAME)u_gl
it started working.
but I still have problems with my project:
68 C:..FEMOS 2D graphFrm.cpp invalid initialization of reference of type 'const wxString&' from expression of type 'const char*'
42 C:\andrej_priv\OSED 1.0.0\OSED graphic\MyGLCanvas.h in passing argument 6 of `MyGLCanvas::MyGLCanvas(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, int*, const wxPalette&)'
Thx!
Regards Andrej
from
-l$(WXLIBNAME)
-l$(WXLIBNAME)_gl
to
-l$(WXLIBNAME)u
-l$(WXLIBNAME)u_gl
it started working.
but I still have problems with my project:
68 C:..FEMOS 2D graphFrm.cpp invalid initialization of reference of type 'const wxString&' from expression of type 'const char*'
42 C:\andrej_priv\OSED 1.0.0\OSED graphic\MyGLCanvas.h in passing argument 6 of `MyGLCanvas::MyGLCanvas(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, int*, const wxPalette&)'
Thx!
Regards Andrej
Re: opengl
campa wrote:and after changing the linking libraries
from
-l$(WXLIBNAME)
-l$(WXLIBNAME)_gl
to
-l$(WXLIBNAME)u
-l$(WXLIBNAME)u_gl
it started working.
but I still have problems with my project:
68 C:..FEMOS 2D graphFrm.cpp invalid initialization of reference of type 'const wxString&' from expression of type 'const char*'
42 C:\andrej_priv\OSED 1.0.0\OSED graphic\MyGLCanvas.h in passing argument 6 of `MyGLCanvas::MyGLCanvas(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&, int*, const wxPalette&)'
Thx!
Regards Andrej
In MyGLCanvas.h, change the MyGLCanvas constructor from:
Code: Select all
const wxString& name="GLCanvas",
to
Code: Select all
const wxString& name=wxT("GLCanvas"),
As far as adding the "u" to the library, you can automatically do this by going to Tools->Compiler Options->wxWidgets and clicking the Unicode checkbox. I think the only library that needs to be manually changed with "u" is the regex.
-Tony
Everybody's got something to hide except for me and my monkey.