Newbie problems...

This is for the more patient people amongst you...

Basically, I can't seem to get any C++ OpenGL code to compile properly in my compiler. Stuff I've tried to write myself, or other people's listings, it's all the same. I get about 31 errors everytime, and it all seems to stem from the included gl library not recognising the requests from the code. I use DevCpp.

If anyone can spare the time, could they post some basic code that they know will compile properly and display some basic graphics. Thanks.


  • You should give the exact errors that occurred while compiling. Are they syntax errors, linker errors? Are you sure that you have linked the library, since you said that you included it? Did you mean you wrote #include "opengl32.h" and thats it or did you use (in Dev-Cpp) Project options->Parameters?

    If these are linker errors and you are sure that you have -lopengl32 and possibly -lglu32 in the linker options line, then try arranging the linked libraries differently from Project options->Parameters. That works sometimes.

    Also Dev-Cpp should be able to create new OpenGL project that contains some default code for testing and should compile perfectly if everything else is installed properly. Use File->New->Project->Multimedia->OpenGL to create new OpenGL project that has opengl libraries linked by default.

  • Thanks XLoom, I'll have another look at it, and no doubt be back with further questions. Thanks :-)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!