unresolved external symbol _main

Started by
3 comments, last by Una 20 years, 10 months ago
--------------------Configuration: Cpp1 - Win32 Debug-------------------- Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/Cpp1.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Cpp1.exe - 2 error(s), 0 warning(s) what does that mean?! i get that in many sources that i try?
Huh, Im noob :D allways
Advertisement
Have you un-ticked ''Do not create a console?''
Youre using console application! You need a main() function!
Or switch to win32 windowed application, or add a main() function, depending on what you''re progrmaming!

.lick
Oh, thanks.. that worked..
Huh, Im noob :D allways
main() is the entry point for your program. The program will exectute main() as the first step. No main(), the program is lost, as it doesn''t know where to start. you can add parameters to main, and return values, but that''s relatively irrelevant for newbies. After, parameters might become useful, and the main() returned value would be useful if you started your application from inside another console application.

WinMain() is the same, but for Win32 applications.

Everything is better with Metal.

This topic is closed to new replies.

Advertisement