Advertisement

Help me!

Started by February 03, 2002 03:50 AM
10 comments, last by Tran Minh Quang 22 years, 10 months ago
Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/Starfield.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Starfield.exe - 2 error(s), 0 warning(s) I get that message many times when I compile my progra in Visual C++ 6. Why?
Because you set your project to be a console application (for with main() is the entry point) instead of a windows application (for which WinMain() is the entry point).

Edited by - Fruny on February 3, 2002 5:19:34 AM
"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
Advertisement
Yep, remember when you create a new project select Win32 application. Not win32 MFC application though.
No, I choose: win32 Application.
Help me, I still can''t correct it!
3 posts serials! You see how I need it!
Advertisement
The solution has already been posted. Start a new project, making sure you select "Win32 Application" (NOT Win32 Console Application - they are right next to each other so it is easy to click the wrong one by mistake) and add your files to the project.
I know, but many times I select Win32 Application the result is like what I said. My friend sometimes gets the same!
Give me another solution!
Or I must reinstall Visual Studio?
Or must you learn how to use it?

Sorry but if it''s looking for a main, then you specified your project to be a console application.

I doubt VS could mess up with its projects definition to the point of mixing win32 console and plain win32...

"Do it with style or don''t bother doing it."

This topic is closed to new replies.

Advertisement