C++/Building problem - Visual C++ 6.0
I am new with using visual C++ 6.0, so i tried to build the following hello world program:
using namespace std;
cout << "Hello World!" << endl;
I get the following error:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/p1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
p1.exe - 2 error(s), 0 warning(s)
I'm not sure what to make of this.
Any help would be great,
Hello Sienne, thank you for the question.
What happened was that when you created the project, you made it a Windows application instead of a console application. The compiler is looking for the WinMain function to execute on startup instead of looking for
main(). Make a new solution, and copy and paste your code into a console application and you will be good to go.
I hope this information was helpful.