can I use VC 5.0?

Hi, I’m trying to build a program (example from book which I expect is OK) in VC 5.0 but doesn’t work. The libs in Project->Settings -> link “Object/library modules” seem as suggested and include (among others) glut32.lib opengl32.lib glut32.lib. The above libs do exist in my C:\Program Files\DevStudio\Vc\lib directory and I have the “normal” includes (i.e., gl/gl.h, gl/glu.h, gl/glut.h) which all exist.

I ask about 5.0 because I see 6.0 often (tutorials, …). Also, the example I got (complete w/ dsp file) had /ZI and /GZ set in the compile options but I get a warning that these are unrecognized and ignored. The source is a single file which compiles ok (except the warnings) but the build gives the following errors:

Linking…
Block.obj : error LNK2001: unresolved external symbol ___glutInitWithExit@12
Block.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
Debug/Block.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

Block.exe - 3 error(s), 2 warning(s)

Thanks very much for your help.

Do you have the DLL files on your system? While some Windows versions come with OpenGL32.dll, I am sure that none come with GLUT.

(I may be wrong here) – but I would say that all you’d need to do is download GLUT. Can’t give you a link right now, but a search would give you about a million links.

Cheers,
Brendan.

Thanks for the tip but I do have opengl32 in both c:windows\system and c:\windows\system32 (is that a problem?). The file size is 717k and dated 7/29/96. Now that I look, I see that there’s also C:\windows\system\opengl.dll. Also c:\windows\system has glut.dll and glu.dll. Further, in C:\windows\system32 is glut32.dll and glu32.dll. The system is win98. Even still, wouldn’t it be a runtime problem w/o those dll’s rather than a build problem?

How old’s your GLUT? Most of us probably have GLUT3.7. Also, does the GLUT header have those functions in it? Maybe there are tips on the GLUT website for different versions of VC++.

BTW, it’s a linkage error, not a runtime error since the linker is trying to resolve all the function calls in the various object files. It’d be runtime if the function calls were pointer dereferences for example.

[This message has been edited by ffish (edited 05-10-2001).]