🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

compiling any tut in VC6

Started by
4 comments, last by outRider 24 years ago
I''m having some problems compiling any of the tutorials in Visual C++ 6. Copying the code letter for letter or downloading the zip file and inserting the source into my project produces an error either way. The errors are as follows: Compiling... main.c c:\program files\microsoft visual studio\myprojects\test\main.c(19) : error C2061: syntax error : identifier ''keys'' c:\program files\microsoft visual studio\myprojects\test\main.c(19) : error C2059: syntax error : '';'' c:\program files\microsoft visual studio\myprojects\test\main.c(19) : error C2059: syntax error : ''['' c:\program files\microsoft visual studio\myprojects\test\main.c(20) : error C2061: syntax error : identifier ''active'' c:\program files\microsoft visual studio\myprojects\test\main.c(20) : error C2059: syntax error : '';'' c:\program files\microsoft visual studio\myprojects\test\main.c(20) : error C2513: ''/*global*/ '' : no variable declared before ''='' c:\program files\microsoft visual studio\myprojects\test\main.c(21) : error C2061: syntax error : identifier ''fullscreen'' c:\program files\microsoft visual studio\myprojects\test\main.c(21) : error C2059: syntax error : '';'' c:\program files\microsoft visual studio\myprojects\test\main.c(21) : error C2513: ''/*global*/ '' : no variable declared before ''='' c:\program files\microsoft visual studio\myprojects\test\main.c(77) : error C2065: ''fullscreen'' : undeclared identifier c:\program files\microsoft visual studio\myprojects\test\main.c(123) : error C2146: syntax error : missing '')'' before identifier ''fullscreenflag'' c:\program files\microsoft visual studio\myprojects\test\main.c(123) : error C2081: ''bool'' : name in formal parameter list illegal c:\program files\microsoft visual studio\myprojects\test\main.c(123) : error C2061: syntax error : identifier ''fullscreenflag'' c:\program files\microsoft visual studio\myprojects\test\main.c(123) : error C2059: syntax error : '';'' c:\program files\microsoft visual studio\myprojects\test\main.c(123) : error C2059: syntax error : '')'' c:\program files\microsoft visual studio\myprojects\test\main.c(124) : error C2449: found ''{'' at file scope (missing function header?) c:\program files\microsoft visual studio\myprojects\test\main.c(286) : error C2059: syntax error : ''}'' c:\program files\microsoft visual studio\myprojects\test\main.c(366) : warning C4013: ''CreateGLWindow'' undefined; assuming extern returning int c:\program files\microsoft visual studio\myprojects\test\main.c(388) : error C2065: ''active'' : undeclared identifier c:\program files\microsoft visual studio\myprojects\test\main.c(388) : error C2065: ''keys'' : undeclared identifier c:\program files\microsoft visual studio\myprojects\test\main.c(388) : error C2109: subscript requires array or pointer type c:\program files\microsoft visual studio\myprojects\test\main.c(397) : error C2109: subscript requires array or pointer type c:\program files\microsoft visual studio\myprojects\test\main.c(399) : error C2109: subscript requires array or pointer type c:\program files\microsoft visual studio\myprojects\test\main.c(399) : error C2106: ''='' : left operand must be l-value Error executing cl.exe. test.exe - 23 error(s), 1 warning(s) I get these errors without modifying the code in anyway. If i change "bool" to "BOOL" I can get down to just 3 errors, but then the compiler flags the pixel descriptor section with the errors so I have no idea what to do. I''m new to Win32/VC6 programming so I really don''t know what the syntax problem might be and I was hoping someone could help me out. Thanks.
Advertisement
If you want more help... you should give us more informations. Such as the source-code between the line of the first error message and the line of the last error message!

Maybe you forgot a ; or you tzped in a : after an #include or something like this... who knows

Good luck!
Hmm, you said inserting the source into your project? Did you link the opengl libraries?

What happens when you download a zip, open the Workspace and compile it like that?


Let me know, I hate having problems like that.. We''ll work it out..

bosco()

--leader of the free world .. or something ..
Thanks Bosco, I tried your suggestion and just downloaded the project and it worked fine.

I was just annoyed that it wouldn''t work when I tried to reproduce it on my own.

Is there a specific link order that I have to follow? I inserted the *.lib files last in the VC link section...
You know, I''m not a 100% sure it matters, but NeHe has always said at the very beginning before kernel32 and all and that''s where I''ve kept them..


bosco()
--leader of the free world .. or something ..
Putting the GL libs at the end will change nothing...
My 2¢

This topic is closed to new replies.

Advertisement