VC++6.0 unresolved external symbol _main?
hey all,
I''ve been doing some basic windows programming.. well.. VERY basic windows programming. I''ve just been trying to create a window, but whenever I compile the code, I get this error (in vc++6.0):
--------------------Configuration: Window - Win32 Debug--------------------
Compiling...
Window.cpp
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Window.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Window.exe - 2 error(s), 0 warning(s)
Does anyone know what would cause this error? I get this error even if I don''t compile my source code, but the tutorial I''m learning it from (both in the resources section at this site and at http://www.unpluggedsoftware.com).
Any help would be greatly appreciated. I think it might have something to do with the settings on vc++.. but I can''t find anything to do with this particular problem.
Thanks in advance!
Fuzztrek
¬_¬
Maybe I''m way off, but if you''re making a windows program, don''t you use WinMain() instead Main()?
------------------------------
Omnipotent_Q
"Poor people are crazy. I''m eccentric."
------------------------------
Omnipotent_Q
"Poor people are crazy. I''m eccentric."
------------------------------Omnipotent_Q"Poor people are crazy. I'm eccentric."
April 24, 2002 12:44 PM
IT sounds like you have a function called main, with a Windows program you use WinMain instead of the standard main.
yeah you do, and the funny thing is that I DO use winMain. yet i get an error to do with "main" (or so I think.)
¬_¬
¬_¬
April 24, 2002 12:46 PM
If it says unresolved external symbol _main, it means that it''s looking for a function called main, so you are using the incorrect function type (use main instead of WinMain). You must have done a win32 console app, and not a win32 app.
Billy - BillyB@mrsnj.com
Billy - BillyB@mrsnj.com
mmk... how do i get a WIN32 app? I''m not creating a new project or anything, just a new cpp file... :|
¬_¬
¬_¬
Hit the forum search button, or use my link list.
---visit #directxdev on afternet <- not just for directx, despite the name
question: if these errors are so common, why aren''t they known by all? (thanks)
¬_¬
¬_¬
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement