Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: igi on July 14, 2007, 01:43:37 pm

Title: OpenGL library
Post by: igi on July 14, 2007, 01:43:37 pm
dear..

i want make application use OpenGL library.for example, i use glBegin() funtion, but when i compile, there's error that can't undefined reference to glBegin() function.i tried with gcc -o gl gl.c -lMessaGL, but nothing change..

i hope anybody can resolve this.i use MS Windows XP with codeblock RC01

thx..
Title: Re: OpenGL library
Post by: stdlll on August 13, 2007, 08:07:45 pm
I think you should have created a OpenGL Appication project first, and add code to it. To created a OpenGL Appication project: File/New project/select OpenGL Appication /press Enter.
If there is there is no item named "OpenGL Appication", then you did not have installed the OpenGL library. You should add one.
Title: Re: OpenGL library
Post by: thomas on August 14, 2007, 01:01:30 am
Don't know about MESA, having never used it, but from that library's name, it looks like it should work too... hmm?

I'm using -lopengl32 and it works just fine. Maybe worth a try.