Register forum user name Search FAQ

SMAUG server FAQ

Frequently Asked Questions (FAQ) about SMAUG server.


Summary Link errors when recompiling SMAUG
Question When compiling the SMAUG server I get link errors about missing modules, such as: Linking... comm.obj : error LNK2001: unresolved external symbol _WSACleanup@0 comm.obj : error LNK2001: unresolved external symbol _closesocket@4 ident.obj : error LNK2001: unresolved external symbol _closesocket@4 comm.obj : error LNK2001: unresolved external symbol _gethostname@8 comm.obj : error LNK2001: unresolved external symbol _WSAStartup@8 comm.obj : error LNK2001: unresolved external symbol _listen@8 imc.obj : error LNK2001: unresolved external symbol _listen@8 comm.obj : error LNK2001: unresolved external symbol _bind@12 imc.obj : error LNK2001: unresolved external symbol _bind@12 comm.obj : error LNK2001: unresolved external symbol _htons@4 ident.obj : error LNK2001: unresolved external symbol _htons@4 imc.obj : error LNK2001: unresolved external symbol _htons@4 comm.obj : error LNK2001: unresolved external symbol _setsockopt@20 imc.obj : error LNK2001: unresolved external symbol _setsockopt@20 comm.obj : error LNK2001: unresolved external symbol _socket@12 ident.obj : error LNK2001: unresolved external symbol _socket@12 imc.obj : error LNK2001: unresolved external symbol _socket@12 comm.obj : error LNK2001: unresolved external symbol ___WSAFDIsSet@8 ident.obj : error LNK2001: unresolved external symbol ___WSAFDIsSet@8 imc.obj : error LNK2001: unresolved external symbol ___WSAFDIsSet@8 comm.obj : error LNK2001: unresolved external symbol _select@20 imc.obj : error LNK2001: unresolved external symbol _select@20 comm.obj : error LNK2001: unresolved external symbol _gethostbyaddr@12 comm.obj : error LNK2001: unresolved external symbol _inet_ntoa@4 imc-config.obj : error LNK2001: unresolved external symbol _inet_ntoa@4 imc.obj : error LNK2001: unresolved external symbol _inet_ntoa@4 comm.obj : error LNK2001: unresolved external symbol _ntohs@4 ident.obj : error LNK2001: unresolved external symbol _ntohs@4 imc.obj : error LNK2001: unresolved external symbol _ntohs@4 comm.obj : error LNK2001: unresolved external symbol _ioctlsocket@12 ident.obj : error LNK2001: unresolved external symbol _ioctlsocket@12 imc.obj : error LNK2001: unresolved external symbol _ioctlsocket@12 comm.obj : error LNK2001: unresolved external symbol _accept@12 imc.obj : error LNK2001: unresolved external symbol _accept@12 comm.obj : error LNK2001: unresolved external symbol _WSAGetLastError@0 comm.obj : error LNK2001: unresolved external symbol _recv@16 ident.obj : error LNK2001: unresolved external symbol _recv@16 comm.obj : error LNK2001: unresolved external symbol _send@16 ident.obj : error LNK2001: unresolved external symbol _send@16 ident.obj : error LNK2001: unresolved external symbol _connect@12 imc.obj : error LNK2001: unresolved external symbol _connect@12 ident.obj : error LNK2001: unresolved external symbol _getservbyname@8 ident.obj : error LNK2001: unresolved external symbol _getpeername@12 ident.obj : error LNK2001: unresolved external symbol _getsockname@12 imc-config.obj : error LNK2001: unresolved external symbol _inet_addr@4 imc.obj : error LNK2001: unresolved external symbol _inet_addr@4 imc-config.obj : error LNK2001: unresolved external symbol _htonl@4 imc.obj : error LNK2001: unresolved external symbol _sendto@24 imc.obj : error LNK2001: unresolved external symbol _gethostbyname@4 save.obj : error LNK2001: unresolved external symbol __imp__timeKillEvent@4 save.obj : error LNK2001: unresolved external symbol __imp__timeSetEvent@20 services.obj : error LNK2001: unresolved external symbol __imp__StartServiceCtrlDispatcherA@4 services.obj : error LNK2001: unresolved external symbol __imp__RegisterServiceCtrlHandlerA@8 services.obj : error LNK2001: unresolved external symbol __imp__SetServiceStatus@8 services.obj : error LNK2001: unresolved external symbol __imp__DeregisterEventSource@4 services.obj : error LNK2001: unresolved external symbol __imp__ReportEventA@36 services.obj : error LNK2001: unresolved external symbol __imp__RegisterEventSourceA@8 services.obj : error LNK2001: unresolved external symbol __imp__CloseServiceHandle@4 services.obj : error LNK2001: unresolved external symbol __imp__QueryServiceStatus@8 services.obj : error LNK2001: unresolved external symbol __imp__OpenServiceA@12 services.obj : error LNK2001: unresolved external symbol __imp__OpenSCManagerA@12 services.obj : error LNK2001: unresolved external symbol __imp__CreateServiceA@52 services.obj : error LNK2001: unresolved external symbol __imp__DeleteService@4 services.obj : error LNK2001: unresolved external symbol __imp__StartServiceA@12 services.obj : error LNK2001: unresolved external symbol __imp__ControlService@12 c:\source\smaug1.4a\smaug.exe : fatal error LNK1120: 43 unresolved externals Error executing link.exe. smaug.exe - 66 error(s), 0 warning(s)
Answer

Make sure the project uses the following libraries:

  • winmm.lib
  • wsock32.lib
  • advapi32.lib
You can do this by adding the following lines to any source file (eg. comm.c):

#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "wsock32.lib")
#pragma comment(lib, "advapi32.lib")

Search for word or phrase

Enter a word or phrase in the box below to narrow the list down to those that match.

Search for:   

Leave blank to show all FAQs.

View all SMAUG server FAQ

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.