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
--------------------------------
From: Paul Li
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>SzZZMcXd1UySrpeZ8a0sDA==</Id>
> 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)
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").
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/
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.
--
POST BY: http://www.dotNET.us - Need .NET? Just ask, Please dotNET.us
> 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
Maybe you have defined "_WINDOWS" in your preprocessor-definitions?
Be sure that you have "CONSOLE" in your linker-sybsystem!
I have add below line to my source file and I have solve this.
#pragma comment(lib, "Ws2_32.lib")
You should try this.