Jump to content
  • Advertisement
Sign in to follow this  
nicolasbrown

stupid glut

This topic is 3768 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i keep getting the feeling that visual c++ isnt the software i need to compile my files. I followed all the installation instruction on this site http://csf11.acs.uwosh.edu/cs371/visualstudio/#contents i am still getting an error: ------ Build started: Project: last window, Configuration: Debug Win32 ------ Compiling... window.cpp c:\documents and settings\nicolas\my documents\visual studio 2008\projects\project1\last window\window.cpp(4) : fatal error C1083: Cannot open include file: 'gl\glut.h': No such file or directory Build log was saved at "file://c:\Documents and Settings\Nicolas\My Documents\Visual Studio 2008\Projects\Project1\last window\Debug\BuildLog.htm" last window - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== here is the code: #include <windows.h> /* obviously change this to your native library if you're compiling under unix */ #include <gl\gl.h> #include <gl\glut.h> void init(void); void display(void); int main (int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize(250, 250); glutInitWindowPosition(100, 100); glutCreateWindow("My First OpenGL Application"); init(); glutDisplayFunc(display); glutMainLoop(); return 0; } void init(void) { glClearColor(0.0, 0.0, 0.0, 0.0); glColor3f(0.0, 0.0, 1.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-10.0, 10.0, -10.0, 10.0, -10.0, 10.0); } void display(void) { glClear(GL_COLOR_BUFFER_BIT); glRectf(-5.0, 5.0, 5.0, -5.0); glutSwapBuffers(); } what should i do now?

Share this post


Link to post
Share on other sites
Advertisement
Make sure you have glut.h inside of the gl\ directory of your INCLUDE path.

For example, in MSVC++ 2005 (I suspect 2008 is simular), it should be here:
\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\gl\


The error is occurring because it is looking in this path, but is not finding glut.h inside of the gl/ subdirectory.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!