Hello everybody,
I am trying to link dcmtk static libraries in my application and i want to build my application as a dll.
But i get the following linking errors. please help me out.
STM_PrintSCU.lib(STM_PrnSCU.obj) : error LNK2001: unresolved external symbol _WSACleanup@0
dcmpstat.lib(dviface.obj) : error LNK2001: unresolved external symbol _WSACleanup@0
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
STM_Echo.lib(STM_Echo.obj) : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "class OFCondition __cdecl echoSCU(struct T_ASC_Association *)" (?echoSCU@@YA?AVOFCondition@@PAUT_ASC_Association@@@Z)
STM_FindSCU.lib(STM_FindScu.obj) : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "public: int __thiscall CSTM_FindScu::iSendWorklistQuery(int,char * * const)" (?iSendWorklistQuery@CSTM_FindScu@@QAEHHQAPAD@Z)
STM_SCU.lib(stm_scu.obj) : error LNK2001: unresolved external symbol _WSACleanup@0
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
dcmnet.lib(dulfsm.obj) : error LNK2001: unresolved external symbol _gethostbyname@4
dcmpstat.lib(dviface.obj) : error LNK2001: unresolved external symbol _gethostname@8
dcmpstat.lib(dvpspr.obj) : error LNK2001: unresolved external symbol _gethostname@8
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _gethostname@8 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
STM_Echo.lib(STM_Echo.obj) : error LNK2001: unresolved external symbol _gethostname@8
STM_FindSCU.lib(STM_FindScu.obj) : error LNK2001: unresolved external symbol _gethostname@8
STM_SCU.lib(stm_scu.obj) : error LNK2001: unresolved external symbol _gethostname@8
STM_PrintSCU.lib(STM_PrnSCU.obj) : error LNK2001: unresolved external symbol _WSAStartup@8
dcmpstat.lib(dviface.obj) : error LNK2001: unresolved external symbol _WSAStartup@8
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
STM_Echo.lib(STM_Echo.obj) : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function __ehhandler$?echoSCU@@YA?AVOFCondition@@PAUT_ASC_Association@@@Z
STM_FindSCU.lib(STM_FindScu.obj) : error LNK2001: unresolved external symbol _WSAStartup@8
STM_SCU.lib(stm_scu.obj) : error LNK2001: unresolved external symbol _WSAStartup@8
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _Netbios@4 referenced in function "unsigned char * __cdecl getMACAddress(unsigned char * const)" (?getMACAddress@@YAPAEQAE@Z)
dcmnet.lib(dulfsm.obj) : error LNK2001: unresolved external symbol _select@20
dcmnet.lib(assoc.obj) : error LNK2019: unresolved external symbol _select@20 referenced in function "bool __cdecl ASC_associationWaiting(struct T_ASC_Network *,int)" (?ASC_associationWaiting@@YA_NPAUT_ASC_Network@@H@Z)
dcmnet.lib(dul.obj) : error LNK2001: unresolved external symbol _select@20
dcmnet.lib(dcmtrans.obj) : error LNK2001: unresolved external symbol _select@20
dcmnet.lib(dulextra.obj) : error LNK2001: unresolved external symbol _select@20
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _closesocket@4 referenced in function "class OFCondition __cdecl DUL_DropNetwork(void * *)" (?DUL_DropNetwork@@YA?AVOFCondition@@PAPAX@Z)
dcmnet.lib(dcmtrans.obj) : error LNK2001: unresolved external symbol _closesocket@4
dcmnet.lib(dulfsm.obj) : error LNK2001: unresolved external symbol _closesocket@4
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _shutdown@8 referenced in function "class OFCondition __cdecl DUL_DropNetwork(void * *)" (?DUL_DropNetwork@@YA?AVOFCondition@@PAPAX@Z)
dcmnet.lib(dcmtrans.obj) : error LNK2001: unresolved external symbol _shutdown@8
dcmnet.lib(dulfsm.obj) : error LNK2001: unresolved external symbol _shutdown@8
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _gethostbyaddr@12 referenced in function "class OFCondition __cdecl receiveTransportConnectionTCP(struct PRIVATE_NETWORKKEY * *,enum DUL_BLOCKOPTIONS,int,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?receiveTransportConnectionTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@W4DUL_BLOCKOPTIONS@@HPAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _setsockopt@20 referenced in function "class OFCondition __cdecl receiveTransportConnectionTCP(struct PRIVATE_NETWORKKEY * *,enum DUL_BLOCKOPTIONS,int,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?receiveTransportConnectionTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@W4DUL_BLOCKOPTIONS@@HPAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dulfsm.obj) : error LNK2001: unresolved external symbol _setsockopt@20
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _accept@12 referenced in function "class OFCondition __cdecl receiveTransportConnectionTCP(struct PRIVATE_NETWORKKEY * *,enum DUL_BLOCKOPTIONS,int,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?receiveTransportConnectionTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@W4DUL_BLOCKOPTIONS@@HPAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol ___WSAFDIsSet@8 referenced in function "class OFCondition __cdecl receiveTransportConnectionTCP(struct PRIVATE_NETWORKKEY * *,enum DUL_BLOCKOPTIONS,int,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?receiveTransportConnectionTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@W4DUL_BLOCKOPTIONS@@HPAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dcmtrans.obj) : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
dcmnet.lib(dulextra.obj) : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _getsockname@12 referenced in function "class OFCondition __cdecl receiveTransportConnectionTCP(struct PRIVATE_NETWORKKEY * *,enum DUL_BLOCKOPTIONS,int,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?receiveTransportConnectionTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@W4DUL_BLOCKOPTIONS@@HPAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _listen@8 referenced in function "class OFCondition __cdecl initializeNetworkTCP(struct PRIVATE_NETWORKKEY * *,void *)" (?initializeNetworkTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAX@Z)
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _bind@12 referenced in function "class OFCondition __cdecl initializeNetworkTCP(struct PRIVATE_NETWORKKEY * *,void *)" (?initializeNetworkTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAX@Z)
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _htons@4 referenced in function "class OFCondition __cdecl initializeNetworkTCP(struct PRIVATE_NETWORKKEY * *,void *)" (?initializeNetworkTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAX@Z)
dcmnet.lib(dulfsm.obj) : error LNK2019: unresolved external symbol _htons@4 referenced in function __ehhandler$?requestAssociationTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z
dcmnet.lib(dul.obj) : error LNK2019: unresolved external symbol _socket@12 referenced in function "class OFCondition __cdecl initializeNetworkTCP(struct PRIVATE_NETWORKKEY * *,void *)" (?initializeNetworkTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAX@Z)
dcmnet.lib(dulfsm.obj) : error LNK2001: unresolved external symbol _socket@12
dcmnet.lib(dcmtrans.obj) : error LNK2019: unresolved external symbol _recv@16 referenced in function "public: virtual long __thiscall DcmTCPConnection::read(void *,unsigned int)" (?read@DcmTCPConnection@@UAEJPAXI@Z)
dcmnet.lib(dcmtrans.obj) : error LNK2019: unresolved external symbol _send@16 referenced in function "public: virtual long __thiscall DcmTCPConnection::write(void *,unsigned int)" (?write@DcmTCPConnection@@UAEJPAXI@Z)
dcmnet.lib(dulfsm.obj) : error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced in function "class OFCondition __cdecl requestAssociationTCP(struct PRIVATE_NETWORKKEY * *,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?requestAssociationTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dulfsm.obj) : error LNK2019: unresolved external symbol _connect@12 referenced in function "class OFCondition __cdecl requestAssociationTCP(struct PRIVATE_NETWORKKEY * *,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?requestAssociationTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dulfsm.obj) : error LNK2019: unresolved external symbol _ioctlsocket@12 referenced in function "class OFCondition __cdecl requestAssociationTCP(struct PRIVATE_NETWORKKEY * *,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?requestAssociationTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
dcmnet.lib(dulfsm.obj) : error LNK2019: unresolved external symbol _inet_addr@4 referenced in function "class OFCondition __cdecl requestAssociationTCP(struct PRIVATE_NETWORKKEY * *,struct DUL_ASSOCIATESERVICEPARAMETERS *,struct PRIVATE_ASSOCIATIONKEY * *)" (?requestAssociationTCP@@YA?AVOFCondition@@PAPAUPRIVATE_NETWORKKEY@@PAUDUL_ASSOCIATESERVICEPARAMETERS@@PAPAUPRIVATE_ASSOCIATIONKEY@@@Z)
./DALTests_GUI/Debug/DAL2.0.dll : fatal error LNK1120: 23 unresolved externals
Thank you so much.
shankari
Link error while using dcmtk
Moderator: Moderator Team
-
- Posts: 20
- Joined: Thu, 2005-03-10, 11:28
- Location: India
- Contact:
-
- DCMTK Developer
- Posts: 117
- Joined: Tue, 2004-11-02, 17:21
- Location: Oldenburg, Germany
- Contact:
-
- DCMTK Developer
- Posts: 117
- Joined: Tue, 2004-11-02, 17:21
- Location: Oldenburg, Germany
- Contact:
See also FAQ 27 at the very bottom.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot], Semrush [Bot] and 1 guest