Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Compiling OpenGL app in CB for novice.
(1/1)
xjtuphy:
I have compiled the opengl samples in the wxwidgets2.6.2 folder.
Environment: windowsxp sp2 with unicode , MONOLITHIC =1 static library.
compiler: gcc
Here is some issues should be noticed.
1.The wxwidgets should be compiled to support opengl.
change the \wxWidgets-2.6.2\include\wx\msw\setup.h
--- Code: --- define wxUSE_GLCANVAS 1
--- End code ---
modified the wxWidgets-2.6.2\build\msw\config.gcc
--- Code: --- USE_OPENGL = 1
--- End code ---
compile wxwidgets. Which creat the library folder wxWidgets-2.6.2\lib\gcc_lib and the libs.
2. Creat a wxwidgets project in CB,add the wxmsw26u_gl (if ansi,maybe wxmsw26_gl)
to the linker ,move it up to the opengl32.(Or the linker will complain that functions not found)
You should build it successfully.
I have some problems with the wx_pch,and the linker says cannot find function.
But when I remove the wx_pch.h off the projiect,and delete the options related to
the pch in the "other options" of the compiler(build options),the complaint disappeard.
hope this helps
Michael:
Hello,
This wiki article is also useful: http://wiki.codeblocks.org/index.php?title=GLFW
And thank you for your help.
Michael
Navigation
[0] Message Index
Go to full version