Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unresolved External - Linking Error

Status
Not open for further replies.

Delameko

Programmer
Oct 14, 2003
37
GB
Hi,

I'm hoping someone can help me. I'm using Visual C++ 6.0 on Win XP (for a university module). I'm completely new to C++ and haven't used VC++ before.

When I try to build this code:

#include <iostream.h>

int main()
{
cout << &quot;Hello World&quot; << endl;
return 0;
}


I get this error:
libcd.lib(wwincrt0.obj) : error LNK2001: unresolved external symbol _wWinMain@16
Debug/HelloWorld.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I've also tried this:
#include <iostream>

int main()
{
std::cout << &quot;Hello World&quot; << std::endl;
return 0;
}

...and got the same error.

I've gone through the FAQs on this forum, made sure the path to libs folder is in the project settings, put wWinMainCRTStartup as my entry point symbol, tried adding the libcd.lib in the library modules, but nothing changes.


Am I missing something fundamental here?

Is there some newer version of cout and endl I can use? As I have no trouble running the sample code.

Please help!
Delameko Stone
 
> libcd.lib(wwincrt0.obj) : error LNK2001: unresolved external symbol _wWinMain@16
When you create the project, be sure to select &quot;win32 console&quot; and not &quot;win32 application&quot;.

One of the project types you should get is an &quot;hello world&quot; example project.


--
 
Thank you!

I thought it would be something simple I was overlooking.

As it is it looks like my lecturers notes are wrong, as he wrote 'win32 application'. So its not entirely my fault :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top