Sign in to follow this  
penka

problem with linking in Visual Studio 2005

Recommended Posts

Hi, I have a problem with linker errors. Here is what i get when i compile: Error 7 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib Error 8 fatal error LNK1120: 1 unresolved externals Can you please help me, Thanks in advanced, Penka

Share this post


Link to post
Share on other sites
Your linker is trying to tell you that a symbol, a function called WinMain in this case, is not defined anywhere in your code. In other words, you probably have created a Win32 application project, when you should have created console application project.

Win32 project's entrypoint is WinMain, where as in the console application the entrypoint is main. As you don't have WinMain defined, linking fails. I assume you don't have a very large codebase, so just create a new project as a console project and copy your current source code into it. That should work.

Also for the future... You should always see your documentation for given error number, in this case searching for LNK2019 would probably give you an example for what you are doing wrong.

Hope this helps...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this