Problems compiling with MS Vis C++ using openGL and GLUT, please help

Problems compiling with MS Vis C++ using openGL and GLUT, please help

Post by Jare » Wed, 06 Oct 1999 04:00:00



Hi,

I'm hoping that one of you gurus can help me out.  I'm trying to compile
openGL programs with GLUT under MS Visual C++ 6.0 on an NT box.  I'm
compiling a program that has successfully compiled and runs on an SGI
O2.  When I build the program, I get the following compiler error:

Compiling...
viewer.c
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
error C2054: expected '(' to follow 'WINGDIAPI'
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
error C2085: 'APIENTRY' : not in formal parameter list
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
error C2146: syntax error : missing ',' before identifier 'glAccum'
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
error C2143: syntax error : missing ';' before '('
c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
error C2059: syntax error : ')'

The last 5 lines repeat with different line numbers until the compiler
gets tired and quits.  I've added the usual gl and glut.lib files to the
object/library list.  Can anybody help me out?  It's nice to work on the
O2s, but the weather's starting to get too cold to drag my ass down to
the lab, so I'd like to work on this stuff at home...

thanks in advance,
Jared

 
 
 

Problems compiling with MS Vis C++ using openGL and GLUT, please help

Post by Michael Kenned » Thu, 07 Oct 1999 04:00:00


Hi.

I think I have a solution to your problem.  I haven't worked in glut for a
year or two, but try adding

#include <windows.h>

BEFORE any instance of #include <gl*.h>

This should do it!

-- Michael Kennedy


Quote:> Hi,

> I'm hoping that one of you gurus can help me out.  I'm trying to compile
> openGL programs with GLUT under MS Visual C++ 6.0 on an NT box.  I'm
> compiling a program that has successfully compiled and runs on an SGI
> O2.  When I build the program, I get the following compiler error:

> Compiling...
> viewer.c
> c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> error C2054: expected '(' to follow 'WINGDIAPI'
> c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> error C2085: 'APIENTRY' : not in formal parameter list
> c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> error C2146: syntax error : missing ',' before identifier 'glAccum'
> c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> error C2143: syntax error : missing ';' before '('
> c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> error C2059: syntax error : ')'

> The last 5 lines repeat with different line numbers until the compiler
> gets tired and quits.  I've added the usual gl and glut.lib files to the
> object/library list.  Can anybody help me out?  It's nice to work on the
> O2s, but the weather's starting to get too cold to drag my ass down to
> the lab, so I'd like to work on this stuff at home...

> thanks in advance,
> Jared


 
 
 

Problems compiling with MS Vis C++ using openGL and GLUT, please help

Post by Jare » Thu, 07 Oct 1999 04:00:00


Thank, works perfectly now.  It's these kinds of little things that drive me
nuts...

> Hi.

> I think I have a solution to your problem.  I haven't worked in glut for a
> year or two, but try adding

> #include <windows.h>

> BEFORE any instance of #include <gl*.h>

> This should do it!

> -- Michael Kennedy



> > Hi,

> > I'm hoping that one of you gurus can help me out.  I'm trying to compile
> > openGL programs with GLUT under MS Visual C++ 6.0 on an NT box.  I'm
> > compiling a program that has successfully compiled and runs on an SGI
> > O2.  When I build the program, I get the following compiler error:

> > Compiling...
> > viewer.c
> > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > error C2054: expected '(' to follow 'WINGDIAPI'
> > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > error C2085: 'APIENTRY' : not in formal parameter list
> > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > error C2146: syntax error : missing ',' before identifier 'glAccum'
> > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > error C2143: syntax error : missing ';' before '('
> > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > error C2059: syntax error : ')'

> > The last 5 lines repeat with different line numbers until the compiler
> > gets tired and quits.  I've added the usual gl and glut.lib files to the
> > object/library list.  Can anybody help me out?  It's nice to work on the
> > O2s, but the weather's starting to get too cold to drag my ass down to
> > the lab, so I'd like to work on this stuff at home...

> > thanks in advance,
> > Jared

 
 
 

Problems compiling with MS Vis C++ using openGL and GLUT, please help

Post by driv.. » Thu, 07 Oct 1999 04:00:00


Also, you can just include glut.h and it will include windows.h, gl.h, and glu.h
for you.

> Thank, works perfectly now.  It's these kinds of little things that drive me
> nuts...


> > Hi.

> > I think I have a solution to your problem.  I haven't worked in glut for a
> > year or two, but try adding

> > #include <windows.h>

> > BEFORE any instance of #include <gl*.h>

> > This should do it!

> > -- Michael Kennedy



> > > Hi,

> > > I'm hoping that one of you gurus can help me out.  I'm trying to compile
> > > openGL programs with GLUT under MS Visual C++ 6.0 on an NT box.  I'm
> > > compiling a program that has successfully compiled and runs on an SGI
> > > O2.  When I build the program, I get the following compiler error:

> > > Compiling...
> > > viewer.c
> > > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > > error C2054: expected '(' to follow 'WINGDIAPI'
> > > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > > error C2085: 'APIENTRY' : not in formal parameter list
> > > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > > error C2146: syntax error : missing ',' before identifier 'glAccum'
> > > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > > error C2143: syntax error : missing ';' before '('
> > > c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) :
> > > error C2059: syntax error : ')'

> > > The last 5 lines repeat with different line numbers until the compiler
> > > gets tired and quits.  I've added the usual gl and glut.lib files to the
> > > object/library list.  Can anybody help me out?  It's nice to work on the
> > > O2s, but the weather's starting to get too cold to drag my ass down to
> > > the lab, so I'd like to work on this stuff at home...

> > > thanks in advance,
> > > Jared

 
 
 

1. Compiling GLUT/OpenGL programs using Borland C++ Builder?

Hello!

I am developing programs using OpenGL and GLUT under UNIX. Now I would
like to re-compile some of them under Windows 95. I own a copy of
Borland's C++ Builder and have the SGI OpenGL SDK installed, as well as
the Windows 95 GLUT libraries.
I already have implib'ed the GLUT libraries for the Borland compiler.
Now, whenever I want to compile one of my programs using

bcc32 test.cpp
(the necessary includes/libs are in the respective path)

there are warnings/errors like "APIENTRY not defined" or "WINGDIAPI not
defined" in the header files glut.h and gl.h. Is there some kind of
#define that is necessary or do I have to include certain libraries like
vcl.h?
(Note: I have successfully compiled my programs on a Linux machine and
under Solaris 2 with Mesa. I think they are ok.)

Many thanks in advance.

--
CU, Jan Fischer
http://www.uni-ulm.de/~s_jfisch
http://www.wohnheim.uni-ulm.de/~jfischer

2. roll angle pls help

3. Problems using GLUT in MS Visual C++ 6

4. Drawing on the Desktop hdc

5. MS VS++ 4.0: Compiling OpenGL/GLUT program

6. PAINT EFFECTS ICON PROBLEM

7. Help: Plugin compiling under MS Visual C++ 6

8. jobz

9. Compiling problem: Visual C++ and GLUT

10. Newbie: Compiling OpenGL programs using GLUT 3.7 and VC++ 6.0

11. Help needed: Borland C++ 5.0.2 and glut compile

12. Using OpenGL with MS Visual C++ 5.0

13. Problems compiling demos using Borland C++ 5.0