Advertisement

Need help with this link error

Started by February 22, 2000 09:19 PM
2 comments, last by casper 24 years, 6 months ago
I''m trying to compile some test code from Andre''s book and I keep getting this crazy link error. I''ve been trying for five days to figure it out, messing with options,paths,etc in the Visual C++ IDE and can''t figure this link error out. So guys can someone assist me with this problem so I can continue writing my game. Here is the error=> Deleting intermediate files and output files for project ''stackem - Win32 Debug''. --------------------Configuration: stackem - Win32 Debug-------------------- Compiling... stack.cpp Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/stackem.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. stackem.exe - 2 error(s), 0 warning(s) Oh and by the way how do you guys insert the different little icons in your message? Also can I type HTML in my posts? I''m new to this site so forgive for all the questions? Thanks, Casper
...for over a thousand years the Jedi Knights have been the guardians of peace and justice..before the dark times..before the EmpireCasper..
Well, as it appears, the program you are trying to compile is either

a) incomplete (doesn''t have a main function, in which case you must code one up yourself).

b) you''ve created a console workspace for a Windows program and therefore ''main'' is the entry point not ''WinMain'' which causes problems since a Windows program doesn''t have a main.

My guess is that its option (b). To fix this, open visual studio, create a new workspace, and make sure its of type ''Win32 Application''. If that doesn''t work then you''ve got to create the ''main'' function. If you don''t know what this is, then if you really want this to work read up on C/C++.

Hope this helps.

PS. Sorry if you know all this already, I''m not trying to insult your intelligence, I''m just working with what you posted.

Later.
--------------------------I guess this is where most people put a famous quote..."Everything is funnier with monkey''s" - Unknown
Advertisement
Yep! I think it''s b), too.
Try to change the settings of your project.
Thanks Guys !
...for over a thousand years the Jedi Knights have been the guardians of peace and justice..before the dark times..before the EmpireCasper..

This topic is closed to new replies.

Advertisement