Visual 2010, error LNK2001: unresolved external symbol_WinMainCRTStartup

C

Chromana

Hi, I'm just starting out with C++. I'm using MS Visual C++ 2010
Express. I have installed Windows SDK (although I'm not sure if I've
linked Visual to the SDK properly).

I'm just trying out the simple program on this page:
http://msdn.microsoft.com/en-us/library/ff381409(v=VS.85).aspx
But when I try to compile and run I get this error:


1>------ Build started: Project: propertest, Configuration: Debug
Win32 ------
1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
1>c:\users\alex\documents\visual studio 2010\Projects\propertest\Debug
\propertest.exe : fatal error LNK1120: 1 unresolved externals

Any ideas? :(
Even trying to compile a blank file gives this error. I think there is
an issue in the settings somewhere...
Thanks, Alex
 
F

Francesco S. Carta

Hi, I'm just starting out with C++. I'm using MS Visual C++ 2010
Express. I have installed Windows SDK (although I'm not sure if I've
linked Visual to the SDK properly).

I'm just trying out the simple program on this page:
http://msdn.microsoft.com/en-us/library/ff381409(v=VS.85).aspx
But when I try to compile and run I get this error:


1>------ Build started: Project: propertest, Configuration: Debug
Win32 ------
1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
1>c:\users\alex\documents\visual studio 2010\Projects\propertest\Debug
\propertest.exe : fatal error LNK1120: 1 unresolved externals

Any ideas? :(
Even trying to compile a blank file gives this error. I think there is
an issue in the settings somewhere...

You guessed right, "unresolved external symbol" errors get raised when
you miss to add the proper libraries to your project - i.e. settings
problem. Though, since I'm not experienced with VS, I cannot directly
help you - furthermore, compiler specific issues are off-topic here.

Search the web for "visual studio unresolved external symbol" and you'll
get plenty of similar cases, eventually you'll get pointers on how to
solve it.

Consider also posting to an MS group or forum - here we usually discuss
issues strictly related to the C++ language, not to the tools that use it.
 
V

Victor Bazarov

Hi, I'm just starting out with C++. I'm using MS Visual C++ 2010
Express. I have installed Windows SDK (although I'm not sure if I've
linked Visual to the SDK properly).

I'm just trying out the simple program on this page:
http://msdn.microsoft.com/en-us/library/ff381409(v=VS.85).aspx
But when I try to compile and run I get this error:


1>------ Build started: Project: propertest, Configuration: Debug
Win32 ------
1>LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
1>c:\users\alex\documents\visual studio 2010\Projects\propertest\Debug
\propertest.exe : fatal error LNK1120: 1 unresolved externals

Any ideas? :(
Even trying to compile a blank file gives this error. I think there is
an issue in the settings somewhere...

Yes, it's in settings most likely. The linker does not know where to
find the libraries (.lib) for your SDK. However, this is not a C++
problem, it's a problem with your installation of the two Microsoft
products, and as such this is off-topic, sorry.

There used to be the newsgroup microsoft.public.vc.ide_general (among a
few others with 'microsoft.public.vc' in the name), and that's where you
could post a question on how to set your IDE to pick up the libraries
from some other place. But I am not sure it's active anymore, my news
provider *removed* those newsgroups from its list. Try looking on the
MS web site for their online forums.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top