Troubleshooting
Problem
Attempts to build BaseStation node results in "LNK2019" error in IBM Rational Test RealTime.
Symptom
The full error message is as follows: UmtsServer.obj : warning LNK4217: locally defined symbol __atp_free imported in function "public: __thiscall List::~List(void)" (??1List@@QAE@XZ) tcpsck.obj : error LNK2019: unresolved external symbol _htons@4 referenced in function _tcpsck_set_addr tcpsck.obj : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function _tcpsck_set_addr tcpsck.obj : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function _tcpsck_init tcpsck.obj : error LNK2019: unresolved external symbol _setsockopt@20 referenced in function _tcpsck_new_socket tcpsck.obj : error LNK2019: unresolved external symbol _socket@12 referenced in function _tcpsck_new_socket tcpsck.obj : error LNK2019: unresolved external symbol _listen@8 referenced in function _tcpsck_bind_and_listen tcpsck.obj : error LNK2019: unresolved external symbol _bind@12 referenced in function _tcpsck_bind_and_listen tcpsck.obj : error LNK2019: unresolved external symbol _gethostname@8 referenced in function _tcpsck_gethostname tcpsck.obj : error LNK2019: unresolved external symbol _ntohs@4 referenced in function _tcpsck_get_port tcpsck.obj : error LNK2019: unresolved external symbol _getsockname@12 referenced in function _tcpsck_get_port tcpsck.obj : error LNK2019: unresolved external symbol _accept@12 referenced in function _tcpsck_accept tcpsck.obj : error LNK2019: unresolved external symbol _connect@12 referenced in function _tcpsck_connect tcpsck.obj : error LNK2019: unresolved external symbol _closesocket@4 referenced in function _tcpsck_close tcpsck.obj : error LNK2019: unresolved external symbol _send@16 referenced in function _tcpsck_send tcpsck.obj : error LNK2019: unresolved external symbol ___WSAFDIsSet@8 referenced in function _tcpsck_data_ready tcpsck.obj : error LNK2019: unresolved external symbol _select@20 referenced in function _tcpsck_data_ready tcpsck.obj : error LNK2019: unresolved external symbol _recv@16 referenced in function _tcpsck_recv tcpsck.obj : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function _tcpsck_end tcpsck.obj : error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced in function _tcpsck_get_last_error .\cvisual9\BaseStation.exe : fatal error LNK1120: 19 unresolved externals status 96
UmtsServer.obj : warning LNK4217: locally defined symbol __atp_malloc imported in function "public: __thiscall List::List(int)" (??0List@@QAE@H@Z)
Cause
Applications that use Winsock must be linked with the Ws2_32.lib library file.
Resolving The Problem
Procedure:
- Open BaseStation Configuration Settings by clicking on menu Project > Settings...
- Navigate to Configuration properties > Build > Linker
- Move to the panel on right-side and add "ws2_32.lib" into Additional objects and libraries followed by clicking on Apply
- Click OK to close the BaseStation Configuration Settings
- Rebuild BaseStation test node.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21615574