MSVS's preprocessor vs gcc's preprocessor

Started by
68 comments, last by 4mad3u5 10 years, 1 month ago

I am getting errors on gcc, my msvs is working just fine.

Advertisement

I noticed that I am using glew.h in GLTools.h and not in my main program. I don't know if I am giving gcc the path to that header file. But I must be because the preprocessor is finding it.

Can you try adding -DGLAPIENTRY to you GCC command line?

Also, find the errors at the top (beginning) of the error output, I suspect there may be a message about file not found. The GCC preprocessor may not like the bell character used like that.

Stephen M. Webb
Professional Free Software Developer

The gl.h file depends on other files, for example on Windows you need to include windows.h before gl.h. On the other hand, glut.h handles that already. If you include glut.h, then don't include gl.h or glu.h, because it's doing that already as well as preparing the correct symbols for gl.h and glu.h to work.

I realize that files depend on each other and what is happening is that a dependency isn't being defined, I just have know idea what to do about it.


Also, find the errors at the top (beginning) of the error output, I suspect there may be a message about file not found. The GCC preprocessor may not like the bell character used like that.

My entire command line fills up and I can not see that.

Can you try adding -DGLAPIENTRY to you GCC command line?

when I tried that I got errors for 10 mins and I just killed it

I tried to see as quick as I could what it said right after I try compiling and it says a .h is missing.

I tried to see as quick as I could what it said right after I try compiling and it says a .h is missing.

A .h is missing... Well... That's why I asked you back in reply #5 whether you have GLUT/FreeGLUT installed.

This snippet:


#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h> // Windows FreeGlut equivalent

Why don't you right-click each #included file and see whether your IDE can find it? Just to be sure...

Help people help you. Read the FAQ.

Those header files are not giving me problems on their own.

gl.h not found

glu.h not found

glut.h not found

but I am using the command line and using -I to find them.

This topic is closed to new replies.

Advertisement