Solaris Opengl Header problems

Hi,

Im using solaris with bash.

I have entered CC -o Demo demo.cc and I get the following error:

Error: Could not open include file<GL/gl.h>.  

I get several more for glx, glext and glut

This means that the linker can not find the GL files as they are not in the system path. How do you do this in Solaris & Bash?

Thanks For your help
-Alex

Actually it means the compiler not the linker cant find the files. Find the location of the files on your system. A brute force method is

find / -name gl.h  

and then add the path of that to the compiler using the -I flag e.g. if the gl.h is in

/usr/local/include/GL/gl.h  

then you would use

CC -I/usr/local/include -o Demo demo.cc  

Though I suspect you are going to have many more problems e.g. unresolved symbols because you aren’t linking in the openGL and GLUT libraries.

These kind of posts should really go in the Linux forum not here. Though I would suggest just reading the man pages on the compiler and linker to get an understanding of what they do and the command line flags first.

–Stuart.

hi,

I tried what you said, it still is wanting those files…

-Alex

A bit more information might be helpful. For instance;

  1. So you found the directory containing the files. Where are they?
  2. What EXACTLY did you type on the command line to compile the demo?
  3. Show the EXACT output you get from that command line.

People can’t help without information to work with.
–Stuart.