News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Compiling OpenGL app in CB for novice.

Started by xjtuphy, December 08, 2005, 01:05:25 PM

Previous topic - Next topic

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

  define wxUSE_GLCANVAS       1

modified the wxWidgets-2.6.2\build\msw\config.gcc
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

Michael

#1
Hello,

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

And thank you for your help.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]