Advertisement

VISUAL C++ 6.O ???

Started by February 09, 2001 09:01 AM
0 comments, last by bigdawg786 24 years ago
I am having problems running newpaint2.c and gasket.c. I am trying to run it in VISUAL C++ 6.0 in Windows 98 Operating System. I downloaded the SOURCE CODE for glut (glut-3.7.3-src.zip) and followed the GLUT for Win32 README to perform all necessary tasks. I copied glut32.dll to windows\system and .lib to \Lib and glut.h to \GL. I opened Workspace, found the glut.dsw workspace file and built glut32.dll, tests, and ALL. I also included Opengl32.lib glu32.lib and glut32.lib in project settings under link menu. I first open a new workspace. Then I open a new project (I''ve tried Win32 Application and Win32 Console Application). And finally, I open a C++ Source File. I have pasted the errors that occur when I build the projects. Everytime I build newpaint2.c, it throws back the error message: --------------------Configuration: newpaint2 - Win32 Debug-------------Compiling... newpaint2.cpp c:\windows\desktop\newpaint2\newpaint2\newpaint2.cpp(44) : error C2065: ''random'' : undeclared identifier c:\windows\desktop\newpaint2\newpaint2\newpaint2.cpp(228) : error C2660: ''exit'' : function does not take 0 parameters c:\windows\desktop\newpaint2\newpaint2\newpaint2.cpp(356) : warning C4508: ''main'' : function should return a value; ''void'' return type assumed Error executing cl.exe. newpaint2.obj - 2 error(s), 1 warning(s) Everytime I build gasket.c, it throws back the error message: --------------------Configuration: gasket - Win32 Debug-------------------- Compiling... gasket.cpp C:\Windows\Desktop\gasket\gasket\gasket.cpp(35) : warning C4101: ''i'' : unreferenced local variable Linking... gasket.obj : error LNK2001: unresolved external symbol "int __cdecl rand(void)" (?rand@@YAHXZ) LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/gasket.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. gasket.exe - 3 error(s), 1 warning(s) PLEASE REPLY BACK AND GUIDE ME TO CORRECT MY MISTAKES. I have exhausted all my resources. Thank You. Bigdawg786@hotmail.com
The problem is that the original files is for another compiler/libraries/OS and has not much to do with GLUT.

random, rand : is called something else like randomize, rnd or similar look in the documentation for VC

exit: right, exit(0); is OK but not just exit;

main : should return a value (ANSI)

WinMain : you should create a console not a gui app for GLUT

This topic is closed to new replies.

Advertisement