Skip to main content
gamedev.net
🔒 Locked

Linker Error

Started by Nullio Dec 13, 2001 at 9:25 PM 6 replies 350+ views
Original Post
Nullio
Nullio
  
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?
eagleboy
eagleboy
your compiler was expecting to find a function "main", and didn''t.
Nullio
Nullio
Why does it want a main()??? I have a WinMain, isn''t that the same thing???
Martee
Martee
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
Oluseyi
Oluseyi
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!
Nullio
Nullio
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++)
jacksonh
jacksonh
I think its easiest to just create a new Win32 project than add all of your files.
Fruny
Fruny
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.