PDA

View Full Version : msvcrt.lib error!(in VS2005)


XiiX
05-06-2009, 09:20 AM
Hi.I would like to ask if someone knows how to fix this problem?
I am working on VS2005 and i cant build my project,i am just getting this error

msvcrt.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
1>C:\Users\XiiX\Desktop\Racing-Sense\RacingSense\Release \RacingSense.exe : fatal error LNK1120: 1 unresolved externals

Please help me if you can!!!
Thanks!

Reedbeta
05-06-2009, 10:00 AM
It means the linker is trying to find the 'main' function, but there isn't one. Probably, the file it's in is not being included in the project.

XiiX
05-06-2009, 10:08 AM
Ok Thanks, but what file i need to include becose i allready included in project "msvcrt.lib" file.

Reedbeta
05-06-2009, 10:52 AM
You need to write a main function, in a cpp file, and include that in the project. If you don't know what a main function is, you need to go get a book about C/C++ before going any further.

You don't need to include msvcrt.lib in your project; it's automatically included.

XiiX
05-06-2009, 11:10 AM
Okay i founded my problem.Engine i am using don't work in console application only in Win32 basic app.I writed main function and it worked.

THANKS FOR HELP!