Again an "error LNK2019"  
Author Message
James Mayer





PostPosted: Visual C++ Language, Again an "error LNK2019" Top

Well,

I've seen many posts related to this linker error, but I haven't been able to solve my problem with them.

I'm building a DirectX 8.0 game with Visual Studio 2005.

The errors I got are (I guess the one that matters is the first one) :

LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Documents and Settings\Admin\My Documents\Visual Studio 2005\Projects\GameCore\Debug\GameCore.exe : fatal error LNK1120: 1 unresolved externals

Thanks for any help with this problem.



Visual C++11  
 
 
n0n4m3





PostPosted: Visual C++ Language, Again an "error LNK2019" Top

Hi,
that means you're trying to create an application but there's no main function in your project.

void main()
{
// code
}


 
 
Freezer





PostPosted: Visual C++ Language, Again an "error LNK2019" Top

I tried but it didn't work. Instead, I got some other errors :




LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Documents and Settings\Admin\My Documents\Visual Studio 2005\Projects\GameCore\Debug\GameCore.exe : fatal error LNK1120: 1 unresolved externals


 
 
OShah





PostPosted: Visual C++ Language, Again an "error LNK2019" Top

I tried but it didn't work. Instead, I got some other errors :




LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\Documents and Settings\Admin\My Documents\Visual Studio 2005\Projects\GameCore\Debug\GameCore.exe : fatal error LNK1120: 1 unresolved externals

When you created a new project, you selected a console application when you should have selected a windows (GUI) application.

see http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=65052&SiteID=1 and http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=204985&SiteID=1.



 
 
Freezer





PostPosted: Visual C++ Language, Again an "error LNK2019" Top

OK, thank you both, it linked properly :)