Advertisement

Pronlem with compiling

Started by January 08, 2002 03:53 AM
4 comments, last by Speik 23 years, 1 month ago
I cant compile my openGl demo! When i compile it stands : "Error not found glu.h" but i have glu.h. Its strange Help me Speik
Speik
try using #include <GL\glu.h>

if it still doesn''t works, check your compiler and add the directory in which glu.h is located in to the existing list of include directories.

Example: Visual C++

Tools->Options->Directories. Then press the NEW button.


Advertisement
Actually, don''t
#include <GL\glu.h> 
, but
#include <GL\\glu.h> 
or preferably
#include <GL/glu.h> 


Otherwise, the compiler will interpret the \g as an escape code, which it isn''t.

Kippesoep
Writing it this way works fine:
#include <gl\glu.h> 


You also have to include glu32.lib.

"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"
Thanks guys.....it works now...i forgott the .lib file





Speik
Speik
MSVC is smart enough to recognise that this is a pathname and will fix it accordingly. Not all compilers do this, so it''s better to get used to the forward slashes. I''ve seen lots of people wonder why
FILE *f = fopen ("c:\newfile", "wb"); 
doesn''t work...

Kippesoep

This topic is closed to new replies.

Advertisement