1>------ Build started: Project: allegro, Configuration: Release Win32 ------
1> allegro.cpp
1>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
1>c:\users\lenovo\documents\visual studio 2010\Projects\allegro\Release\allegro.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Recommended Answers

All 2 Replies

If you wrote the program as MS-Windows GUI, such as it uses WinMain() instead of main(), then that link error tells me that you created the wrong kind of project. You should have started with a Win32 Project, not a Win32 Console Application (assuming your compiler is VC++ 2010).

yes vc+2010 express. I made a funny mistake.
thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.