MS VS++ 4.0: Compiling OpenGL/GLUT program

MS VS++ 4.0: Compiling OpenGL/GLUT program

Post by Steve Sloa » Wed, 17 Sep 1997 04:00:00



I'm trying to build the first OpenGL/GLUT example in the OPENGL
PROGRAMMING GUIDE (Second Edition) in Windows 95 with MS Visual
C++ 4.0 Standard Edition. The program is Example 1-2, which just
draws a white square on a black background.

The program compiles just fine. It just won't link. Here's the
output from the "Win32 Debug":

Linking...
LIBCD.lib(wincrt0.obj) :

          (Does that mean it's somehow trying to compile a 16-bit
          version? Could that be the reason for the error?)
Debug/GL Test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe
GL Test.exe - 2 error(s), 0 warning(s)

I've tried using the MS version of the opengl32.lib and glut32.lib
as my libraries, and I've tried it with the SGI OpenGL for Windows
libraries glut.lib and opengl.lib.
_____________________________________________________________________

Computer Science graduate at the University of Alabama in Huntsville
Science fiction and raytracing pictures and links:
    http://mars.cs.uah.edu/cs/students/ssloan/
C++: a language that allows your friends to access your private parts
"In this house, we obey the laws of thermodynamics!" Homer J. Simpson

 
 
 

MS VS++ 4.0: Compiling OpenGL/GLUT program

Post by Phil Feldma » Thu, 18 Sep 1997 04:00:00



>          (Does that mean it's somehow trying to compile a 16-bit

Try making a new project that is a Win32 console application. This will
give you a "dos" program that just needs a main(), instead of having to
deal with Windows issues.

 
 
 

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

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

2. DVD question

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

4. Sorry -- Re: Gates' Baby Names: FUN Break

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

6. Help needed by IBM user

7. GLUT/NT 4.0: opengl32.dll vs. opengl.dll

8. (no subject)

9. OpenGL vs GLUT vs Cosmo3D vs FahrenheitSG

10. MS openGL vs MS Direct3D?

11. Compiling programs in MS-DOS using SRGP

12. MS OpenGL vs SGI OpenGL

13. MS OpenGL vs SGI OpenGL - What are the advantages