User forums > Using Code::Blocks

wxwidgets and opengl

<< < (2/3) > >>

stahta01:

--- Quote from: LinuxhaxU on March 11, 2011, 12:48:23 am ---H:\mywxgl\mywxglMain.cpp|68|error: 'WX_GL_RGBA' was not declared in this scope|

--- End quote ---

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.

--- Code: ---#include <wx/defs.h>
#if !wxUSE_GLCANVAS
    #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"
#endif

--- End code ---

Tim S.

LinuxhaxU:
H:\mywxgl\mywxglMain.h|14|error: #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"|\

thanks for the help I guess this means I have to build wxWidgets my self?

stahta01:

--- Quote from: LinuxhaxU on March 11, 2011, 08:57:36 pm ---H:\mywxgl\mywxglMain.h|14|error: #error "OpenGL required: set wxUSE_GLCANVAS to 1 and rebuild the library"|\

thanks for the help I guess this means I have to build wxWidgets my self?



--- End quote ---

It could mean that or it could mean you did something wrong!!!


--- Quote from: stahta01 on March 11, 2011, 03:40:59 pm ---Turn on Full Compiler Logging http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

--- End quote ---

LinuxhaxU:
this is the build log:

--- Code: ---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
--- End code ---

stahta01:
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.

--- Code: ---  -IH:\wxWidgets2.8\include
 -IH:\wxWidgets2.8\lib\gcc_dll\mswud

--- End code ---

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version