Author Topic: Code::Blocks 10.05 and OpenGL (C Compilation Errors)  (Read 6428 times)

Offline Flotonic

  • Single posting newcomer
  • *
  • Posts: 3
Code::Blocks 10.05 and OpenGL (C Compilation Errors)
« on: March 27, 2011, 05:20:59 am »
I'm confused. I add opengl32.lib as a library, but, when compiling that, Code::Blocks gives me this error:

Code
opengl32.lib: File not recognized: File format not recognized.

It isn't compiled due to this. When I leave opengl32.lib out of the library stuff, the program compiles, but I'm greeted with a new error:

Code
The procedure entry point glRotatef could not be located in the dynamic link library OPENGL.dll.

OPENGL.dll is trying to be used instead of opengl32.dll, which is what should be used. However, opengl32.lib must be tacked on as a library in order for the program to use opengl32.dll.

Is there a specific opengl32.lib that I should be using made just for Code::Blocks? The ones I've tried off the Internet give me unpleasing results.

Thanks in advance!

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Code::Blocks 10.05 and OpenGL (C Compilation Errors)
« Reply #1 on: March 27, 2011, 09:52:31 am »
There is no such thing as a specific opengl32.lib for Code::Blocks as, you see, Code::Blocks is just an IDE. Please check which compiler you are using, even the version may come in handy, and run a Google search on that for OpenGL support.

From what I see you seem to have a library already, but it is either broken or not for your compiler.

Offline Flotonic

  • Single posting newcomer
  • *
  • Posts: 3
Re: Code::Blocks 10.05 and OpenGL (C Compilation Errors)
« Reply #2 on: March 27, 2011, 06:05:45 pm »
Thanks. I was just assuming that Code::Blocks, although and IDE, had already somehow checked the opengl32.lib and denied it. You have some good logic, though.

I decided to do a little bit of research and I came across a tutorial for setting up MinGW and OpenGL. I followed it and all worked well. With the problem solved, how would I go about locking this topic?