Question:
Visual C++ 2010 Express fatal error LNK1120: 1 unresolved externals?
2010-10-15 08:37:31 UTC
Hello
I would like to visualize the output in a simple Hello World but I see always this:
fatal error LNK1120: 1 unresolved externals
I surfed the web but I cannot figure out by myself..
I use VC++ 2010 Express, I created a new project with Win32 Project.
This is the code:
#include
using namespace std;
using std::cout;

int main()
{
cout<<"Hello World";
cin.get();
return 0;
}
Thanks
Four answers:
JoelKatz
2010-10-15 08:41:40 UTC
The error message should tell you the name of the symbol it could not resolve.



Update: It sounds like you have your project settings configured for a different type of project than your project actually is.
?
2016-10-14 04:11:30 UTC
Fatal Error Lnk1120 1 Unresolved Externals
2010-10-15 09:28:06 UTC
You need to write the above program as a Console or DOS application. (Not Win32)



A Console or DOS application has a main() whereas a Windows Application has a WinMain()



Since you made it a Win32 application it is looking for WinMain.



Make it console application and it will run.
anto
2010-10-15 09:03:53 UTC
That should be a console application.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...