Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


GLUT - Error :(


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 Kheteris   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 September 2003 - 07:38 AM

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?

Sponsor:

#2 Dave Hunt   Crossbones+   -  Reputation: 3157

Like
Likes
Like

Posted 16 September 2003 - 07:41 AM

Did you include windows.h before including gl.h?


#3 Null and Void   Moderators   -  Reputation: 1087

Like
Likes
Like

Posted 16 September 2003 - 07:46 AM

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.



#4 Kheteris   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 September 2003 - 07:48 AM

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?



#5 a2ps   Members   -  Reputation: 139

Like
Likes
Like

Posted 16 September 2003 - 07:51 AM

opengl.org

#6 Dave Hunt   Crossbones+   -  Reputation: 3157

Like
Likes
Like

Posted 16 September 2003 - 07:55 AM

GLUT for Windows can be obtained here.

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


#7 Kheteris   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 September 2003 - 07:57 AM

Okay, okay, where do I extract it to?

#8 V3rt3x   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 September 2003 - 08:06 AM

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

#9 Dave Hunt   Crossbones+   -  Reputation: 3157

Like
Likes
Like

Posted 16 September 2003 - 08:42 AM

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.


#10 Kheteris   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 September 2003 - 05:59 AM

There is no glut.dsw file... or does it mean to select the workspace I am using for my program?

#11 Kheteris   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 September 2003 - 06:13 AM

Ahhh, nevermind, I got it... I had to download the larger file >.<

#12 Kheteris   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 September 2003 - 06:29 AM

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?


#13 _walrus   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 September 2003 - 06:35 AM

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"

#14 Kheteris   Members   -  Reputation: 122

Like
Likes
Like

Posted 18 September 2003 - 06:38 AM

Yeah it worked! thanks




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS