• Advertisement

Archived

This topic is now archived and is closed to further replies.

GLUT - Error :(

This topic is 5241 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

Hi, I''m learning programing using the Redbook, which uses GLUT and for any of you people who are familiar w/ GLUT may be able to help me w/ this... When I''m compiling I get this error.... --------------------Configuration: cheese - Win32 Debug-------------------- Compiling... cheese.cpp c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing '';'' before type ''void'' c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: ''WINGDIAPI'' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found Error executing cl.exe. cheese.exe - 3 error(s), 0 warning(s) When I double click on one of the errors it sends me to a hudge page of confusing code, anyone want to help me?

Share this post


Link to post
Share on other sites
Advertisement
If you''re using GLUT, you shouldn''t directly include the OpenGL or GLU headers since their location and inclusion style differs depending upon the platform (as Dave Hunt was getting at: in Windows, the GL header includes WGL definitions for some reason, without first including other needed headers). Instead, just include the GLUT header, and it should take care of it.

Share this post


Link to post
Share on other sites
Ahh, no. But that reveals that my School doesn''t have GLUT...

--------------------Configuration: cheese - Win32 Debug--------------------
Compiling...
cheese.cpp
Z:\cheese\cheese.cpp(3) : fatal error C1083: Cannot open include file: ''GL/glut.h'': No such file or directory
Error executing cl.exe.

cheese.exe - 1 error(s), 0 warning(s)

, know where I can download the header file?

Share this post


Link to post
Share on other sites
GLUT for Windows can be obtained here.

You need more than just the header. You need the library to linkt to, as well.

Share this post


Link to post
Share on other sites
you can extract it where there are your source files (in a "GL/" directory for the header) and add ''./'' to your additionnal include directory.

Share this post


Link to post
Share on other sites
quote:
Original post by Kheteris
Okay, okay, where do I extract it to?


There is a link to the readme file at the link I provided. It explains how to install the package.

Share this post


Link to post
Share on other sites
There is no glut.dsw file... or does it mean to select the workspace I am using for my program?

Share this post


Link to post
Share on other sites
Well, after installing the header files I''m getting this error...

--------------------Configuration: Begining - Win32 Release--------------------
Compiling...
Begining.cpp
Linking...
LIBC.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Release/Begining.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Begining.exe - 2 error(s), 0 warning(s)

Anyone understand what I''m doing wrong?

Share this post


Link to post
Share on other sites
I think your project is set to a windows project as opposed to a console project. It''s looking for a function called WinMain but you supplying it with just main. You can change some parameters in the project settings to get to to build for console or you can just remake your project and select "console application" instead of "Windows application"

Share this post


Link to post
Share on other sites

  • Advertisement