Linker Error

Started by
6 comments, last by Nullio 22 years, 4 months ago
  
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/NullEngine.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
  
what does that mean?????, is there a list of linker errors and what they mean?
Advertisement
your compiler was expecting to find a function "main", and didn''t.
Why does it want a main()??? I have a WinMain, isn''t that the same thing???
No.
It most likely wants a main() because your project is a Win32 Console App, instead of a ''normal'' Win32 app.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
quote:Original post by Nullio
is there a list of linker errors and what they mean?

Yes. it''s in MSDN. If you have MSVC and the MSDN Library installed, highlight the error code in the output pane and hit F1. otherwise, you''ll have to search MSDN Library Online.

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
Ok then, where in a project settings is the ability to tell the compiler it is a win32 application and not a console application??


(I''m using Micro$oft visual c++)
I think its easiest to just create a new Win32 project than add all of your files.
quote:Original post by Martee
No.
It most likely wants a main() because your project is a Win32 Console App, instead of a ''normal'' Win32 app.


You know, main() is normal for C++, WinMain() isn''t.
When you choose to create a Win32 app, my guess is that VC++ links to a main() function that basically calls WinMain()

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement