Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / June 2005

Tip: Looking for answers? Try searching our database.

link error LNK2019

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Li - 23 May 2005 20:01 GMT
------ Build started: Project: VESTA_SOAP, Configuration: Debug Win32 ------

Compiling...
VESTA_SOAP.cpp
Linking...
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__send@16 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__accept@12 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__htonl@4 referenced in function _main
VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function _main
MSVCRTD.lib(wcrtexew.obj) : error LNK2019: unresolved external symbol _wWinMain@16 referenced in function _wWinMainCRTStartup
Debug/TEST_SERVER.exe : fatal error LNK1120: 12 unresolved externals

Build log was saved at "file://c:\Documents and Settings\00206518\My Documents\My Win32\Vesta_soap\Debug\BuildLog.htm"
VESTA_SOAP - 13 error(s), 0 warning(s)

---------------------- Done ----------------------

   Build: 0 succeeded, 1 failed, 0 skipped
Jochen Kalmbach [MVP] - 23 May 2005 20:29 GMT
Hi Paul!

> VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function _main
> VESTA_SOAP.obj : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function _main
[quoted text clipped - 12 lines]
> Build log was saved at "file://c:\Documents and Settings\00206518\My Documents\My Win32\Vesta_soap\Debug\BuildLog.htm"
> VESTA_SOAP - 13 error(s), 0 warning(s)

Please add the following to one of your source-file:

#pragma comment(lib, "Ws2_32.lib")

or you can add this lib (Ws2_32.lib) to the linker settings...

You also should change the subsystem in your linker settings from
"WINDOWS" to "CONSOLE" (I assume that you have a "_tmain" instead of a
"_tWinMain").

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/

Paul - 01 Jun 2005 17:34 GMT
Hi Jochen,

Congrats on your MVP award.

I am indeed using _tmain and I set the linker settings to CONSOLE.
I also added lib (Ws2_32.lib) to the linker settings. But I still
getting the following error.

LIBCMTD.lib(wwincrt0.obj) : error LNK2019: unresolved external
symbol _wWinMain@16 referenced in function _wWinMainCRTStartup
Debug/TEST_SERVER.exe : fatal error LNK1120: 1 unresolved externals

Should I have the entry point set to wWinMainCRTStartup in the
linker settings? Your help would be greatly appreciated.

Thanks,
Paul.
Jochen Kalmbach [MVP] - 02 Jun 2005 07:01 GMT
Hi Paul!

> I am indeed using _tmain and I set the linker settings to CONSOLE.
> I also added lib (Ws2_32.lib) to the linker settings. But I still
[quoted text clipped - 3 lines]
> symbol _wWinMain@16 referenced in function _wWinMainCRTStartup
> Debug/TEST_SERVER.exe : fatal error LNK1120: 1 unresolved externals

Maybe you have defined "_WINDOWS" in your preprocessor-definitions?
Be sure that you have "CONSOLE" in your linker-sybsystem!

Signature

Greetings
  Jochen

   My blog about Win32 and .NET
   http://blog.kalmbachnet.de/


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.