View Full Version : Solaris Opengl Header problems
05-10-2007, 09:21 AM
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
05-10-2007, 01:13 PM
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.
05-10-2007, 01:37 PM
I tried what you said, it still is wanting those files...
05-10-2007, 09:12 PM
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.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.