Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: xjtuphy on December 08, 2005, 01:05:25 pm

Title: Compiling OpenGL app in CB for novice.
Post by: xjtuphy on December 08, 2005, 01:05:25 pm
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

modified the wxWidgets-2.6.2\build\msw\config.gcc
Code
 USE_OPENGL = 1 


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
Title: Re: Compiling OpenGL app in CB for novice.
Post by: Michael on December 29, 2005, 09:52:33 pm
Hello,

This wiki article is also useful: http://wiki.codeblocks.org/index.php?title=GLFW

And thank you for your help.

Michael