H:\mywxgl\mywxglMain.cpp|68|error: 'WX_GL_RGBA' was not declared in this scope|
Did YOU include the correct header "wx/glcanvas.h" in your source code?
And, are you positive you are using the wxWidgets compiled with GL enabled?
Turn on Full Compiler Logging http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
IIRC, Add the following to your source code; if you have the wrong wx library or compile include/search options it is should error out.
#include <wx/defs.h>
#if !wxUSE_GLCANVAS
#error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"
#endif
Tim S.
this is the build log:
Build started on: 11-03-2011 at 16:42.17
Build ended on: 11-03-2011 at 16:42.19
-------------- Build: Debug in recompiled ---------------
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wno-attributes -Wall -g -D__WXDEBUG__ -IH:\wxWidgets2.8\include -IH:\wxWidgets2.8\contrib\include -IH:\wxWidgets2.8\lib\gcc_dll\mswud -c H:\recompiled\recompiledMain.cpp -o obj\Debug\recompiledMain.o
In file included from H:\recompiled\recompiledMain.cpp:10:
H:\recompiled\recompiledMain.h:42: error: ISO C++ forbids declaration of 'wxGLCanvas' with no type
H:\recompiled\recompiledMain.h:42: error: expected ';' before '*' token
H:\recompiled\recompiledMain.cpp: In constructor 'recompiledFrame::recompiledFrame(wxWindow*, wxWindowID)':
H:\recompiled\recompiledMain.cpp:67: error: 'WX_GL_RGBA' was not declared in this scope
H:\recompiled\recompiledMain.cpp:68: error: 'WX_GL_DOUBLEBUFFER' was not declared in this scope
H:\recompiled\recompiledMain.cpp:69: error: 'WX_GL_DEPTH_SIZE' was not declared in this scope
H:\recompiled\recompiledMain.cpp:70: error: 'WX_GL_STENCIL_SIZE' was not declared in this scope
H:\recompiled\recompiledMain.cpp:72: error: 'GLCanvas1' was not declared in this scope
H:\recompiled\recompiledMain.cpp:72: error: expected type-specifier before 'wxGLCanvas'
H:\recompiled\recompiledMain.cpp:72: error: expected ';' before 'wxGLCanvas'
H:\recompiled\recompiledMain.cpp:66: warning: unused variable 'GLCanvasAttributes_1'
Process terminated with status 1 (0 minutes, 2 seconds)
9 errors, 1 warnings
If the wxPack wxwidgets was in "H:\wxWidgets2.8" it looks like you have the proper search folder.
These are the two that are needed (by my memory) for wxWidgets Unicode Debug DLL build.
-IH:\wxWidgets2.8\include
-IH:\wxWidgets2.8\lib\gcc_dll\mswud
So, you need to build wxWidgets right and/or change the search path to a location with the proper wxWidgets with GL.
Note: I am not sure that wxPack supplies the debug version of the library; so, you might try doing an non debug build.
Tim S.