Author Topic: Compiling OpenGL app in CB for novice.  (Read 4328 times)

Offline xjtuphy

  • Single posting newcomer
  • *
  • Posts: 5
Compiling OpenGL app in CB for novice.
« 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
« Last Edit: December 08, 2005, 01:12:49 pm by xjtuphy »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Compiling OpenGL app in CB for novice.
« Reply #1 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
« Last Edit: December 29, 2005, 09:55:19 pm by Michael »