Marco Eichelberg OFFIS DICOM Team

Joined: 02 Nov 2004 Posts: 1156 Location: Oldenburg, Germany
|
Posted: Tue, 2004-11-09, 10:37 Post subject: FAQ #27: Compilation of DCMTK-based program fails with LNK2001 [MSVC] |
|
|
I am developing an application on Microsoft Visual C++ (MSVC) that uses DCMTK. When I try to compile and link my application against the DCMTK libraries, the linker fails with error LNK2001, e.g.
| Code: | | dcmdata.lib(dcuid.obj) : error LNK2001: unresolved external symbol _Netbios@4 |
You are not linking all of the libraries needed, or you are linking in wrong order (library link order is significant!) The DCMTK libraries have the following internal dependencies (also see this figure): - dcmdata
ofstd
- dcmimage
dcmimgle, dcmdata, ofstd
- dcmimgle
dcmdata, ofstd
- dcmjpeg
ijg8, ijg12, ijg16, dcmimage, dcmimgle, dcmdata, ofstd
- dcmnet
dcmdata, ofstd
- dcmpstat
dcmimage, dcmimgle, dcmsign, dcmsr, imagectn, dcmtls, dcmnet, dcmdata, ofstd
- dcmsign
dcmdata, ofstd
- dcmsr
dcmdata, ofstd
- dcmtls
dcmnet, dcmdata, ofstd
- dcmwlm
dcmnet, dcmdata, ofstd
- imagectn/dcmqrdb
dcmnet, dcmdata, ofstd In addition to the standard libraries, most DCMTK applications have to be linked against the "netapi32" and "wsock32" libraries, even if they contain no networking code. Several external libraries such as zlib, OpenSSL etc. might also be needed. See the INSTALL file for details. |
|