Lingking error:2019,can't figure it out

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
xtray
Posts: 2
Joined: Thu, 2005-11-03, 04:03
Location: BEI JING, PRC

Lingking error:2019,can't figure it out

#1 Post by xtray »

Hello everybody,

i am using DCMTK(Version 3.5.3) to develop a application on Microsoft Visual Studio .NET 2003(cmake is used). The configuration of my application is copied from the compiled dcmtk environment,so it should not get any problems.When i linked the application,i get the following linking errors:


dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _gethostbyname@8 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "long __cdecl gethostid(void)" (?gethostid@@YAJXZ)
dcmdata.lib(dcuid.obj) : error LNK2019: unresolved external symbol _Netbios@4 referenced in function "unsigned char * __cdecl getMACAddress(unsigned char * const)" (?getMACAddress@@YAPAEQAE@Z)

i have already link against netapi32.lib and wsock32.lib,and all the standard ibraries ,also the external libraries such as zlib, OpenSSL etc. have been installed and linked(as the FAQ #27 told).Please help me what shoul i do.

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

The missing functions here are Winsock functions - they should be in the wsock32 library. Maybe you are not linking the libraries in the right order?

xtray
Posts: 2
Joined: Thu, 2005-11-03, 04:03
Location: BEI JING, PRC

#3 Post by xtray »

Thank you very much for the suggestion.It was surely the wsock32 cause the problem.If i link against wsock32.lib,the application can't link through.As long as add the wsock32.lib ,it runs.Once again for you help :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest