General questions regarding the usage of CodeLite
Sergey
CodeLite Enthusiast
Posts: 15 Joined: Tue Dec 16, 2008 11:37 pm
Location: Ukraine
Contact:
Post
by Sergey » Fri Dec 19, 2008 12:12 am
Hello.
I try use wxGLCanvas in my project. The part of the code below.
Code: Select all
#include <GL/glu.h>
#include "wx/glcanvas.h"// inheriting class's header file
#include "wx/image.h"
#include "wx/dcclient.h"
#include "wx/timer.h"
class MeshPicture2D : public wxGLCanvas
{
DECLARE_EVENT_TABLE()
public:
// class constructor
MeshPicture2D(wxWindow* parent, wxWindowID id = wxID_ANY,
const wxPoint & pos = wxDefaultPosition,
const wxSize & size = wxDefaultSize, long style = 0);
// class destructor
~MeshPicture2D();
// Обработка события перепрорисовки канвы элемента
void OnPaint(wxPaintEvent & event);
...
But when I try compile project I take message:
`wxGLCanvas' has not been declared
Where my error?
P.S. Sorry if topic is not for this section.
Смотри в корень!
Лучше скажи мало, но хорошо.
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Fri Dec 19, 2008 12:18 am
The WX library that comes with codelite does NOT has OpenGL enabled, you will need to compile WX by yourself for this.
If you need more assistant with OpenGL and WX you can ask here:
wxforum.shadonet.com
I myself, dont have any experience in OpenGL and WX.
Eran
Sergey
CodeLite Enthusiast
Posts: 15 Joined: Tue Dec 16, 2008 11:37 pm
Location: Ukraine
Contact:
Post
by Sergey » Fri Dec 19, 2008 11:09 am
I downloaded wxWidgets 2.8.9 and built it:
Code: Select all
mingw32-make -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 BUILD=debug USE_OPENGL=1
and
Code: Select all
mingw32-make -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 BUILD=release USE_OPENGL=1
Next I changed WXWIN value to C:\wxWidgets-2.8.9
Now when I press Ctrl+left mouse click on any include file name (like
) it is don't open.
Problem with compilation of wxGLCanvas still exist. Maybe anybody have experience in this question?
Смотри в корень!
Лучше скажи мало, но хорошо.
Sergey
CodeLite Enthusiast
Posts: 15 Joined: Tue Dec 16, 2008 11:37 pm
Location: Ukraine
Contact:
Post
by Sergey » Fri Dec 19, 2008 6:02 pm
Hello. I found the solution of the problem. For using wxGLCanvas I have done several steps.
Download and extract wxWidgets 2.8.9
Edit WXDIR/include/wx/msw/ setup.h, set wxUSE_GLCANVAS to 1, and compile with USE_OPENGL=1 on the command line
Add to linker options -lwxmsw28ud_gl;-lopengl32;-lglu32; - for debug and -lwxmsw28u_gl;-lopengl32;-lglu32; - for release
As I undarstant now for distribution I need distribute additional two files:
wxmsw28u_gcc_custom.dll and
wxmsw28u_gl_gcc_custom.dll .
Should I distribute mingwm10.dll for my project distribution?
Sergey
Смотри в корень!
Лучше скажи мало, но хорошо.
eranif
CodeLite Plugin
Posts: 6375 Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:
Post
by eranif » Fri Dec 19, 2008 6:28 pm
Sergey wrote: Should I distribute mingwm10.dll for my project distribution?
Yes, if u use threads
Eran