linker errors dcmtk visual studio 2017

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
EL_DCMTK
Posts: 2
Joined: Wed, 2018-03-07, 09:03

linker errors dcmtk visual studio 2017

#1 Post by EL_DCMTK » Wed, 2018-03-07, 10:07

used tools:

- visual studio 2017 enterprise (15.5.7)
- platform sdk 10.0.16299.0
- toolset v141
- DCMTK 3.6.1
- X86 debug/release builds

all dependency libs have been rebuilt using above toolset, target project uses mixed code (c++/c#) therefore /clr flagg is enabled. target -> .net v4.5.

current project builds fine using older version of dcmtk (3.5.2), built with visual studio 2012.

during link there are some unresolved externals:

Code: Select all

error LNK2028: Nicht aufgel÷stes Token (0A0006CE) ""public: static void __cdecl DJDecoderRegistration::registerCodecs(enum E_DecompressionColorSpaceConversion,enum E_UIDCreation,enum E_PlanarConfiguration,bool)" (?registerCodecs@DJDecoderRegistration@@$$FSAXW4E_DecompressionColorSpaceConversion@@W4E_UIDCreation@@W4E_PlanarConfiguration@@_N@Z)", auf das in Funktion ""private: static struct FIBITMAP * __clrcall MedicsDICOMService::GetFIBitmapFromDICOM(class DcmFileFormat *,unsigned short,unsigned short,unsigned short)" (?GetFIBitmapFromDICOM@MedicsDICOMService@@$$FCMPAUFIBITMAP@@PAVDcmFileFormat@@GGG@Z)" verwiesen wird.

error LNK2028: Nicht aufgel÷stes Token (0A0007E6) ""public: class OFCondition __thiscall DcmSCPConfig::addPresentationContext(class OFString const &,class OFList<class OFString>,enum T_ASC_SC_ROLE,class OFString const &)" (?addPresentationContext@DcmSCPConfig@@$$FQAE?AVOFCondition@@ABVOFString@@V?$OFList@VOFString@@@@W4T_ASC_SC_ROLE@@0@Z)", auf das in Funktion ""public: void __clrcall MedicsDICOM::DcmStoreSCPManaged::Initialize(struct MedicsDICOM::IDcmTransferSyntaxes ^)" (?Initialize@DcmStoreSCPManaged@MedicsDICOM@@$$FQ$AAMXP$AAUIDcmTransferSyntaxes@2@@Z)" verwiesen wird.

error LNK2001: Nicht aufgel÷stes externes Symbol ""public: virtual class OFCondition __thiscall DcmFileFormat::convertCharacterSet(class OFString const &,bool,bool)" (?convertCharacterSet@DcmFileFormat@@UAE?AVOFCondition@@ABVOFString@@_N1@Z)".
all necessary libs should be there:

charls.lib
dcmdata.lib
dcmdsig.lib
dcmjpeg.lib
dcmjpls.lib
dcmimage.lib
dcmimgle.lib
dcmnet.lib
dcmpstat.lib
dcmsr.lib
dcmtls.lib
dcmwlm.lib
i2d.lib
ijg12.lib
ijg16.lib
ijg8.lib
wininet.lib
ws2_32.lib
netapi32.lib
FreeImaged.lib
avcodec.lib
avdevice.lib
avfilter.lib
avformat.lib
avutil.lib
swscale.lib
oflog.lib
ofstd.lib
legacy_stdio_definitions.lib

so i don't really know what's the issue in this case. maybe you can enlighten me, thank you :)

J. Riesmeier
DCMTK Developer
Posts: 2284
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: linker errors dcmtk visual studio 2017

#2 Post by J. Riesmeier » Wed, 2018-03-07, 11:01

Are you mixing old DCMTK header files with new DCMTK library files? E.g., the last error message seems to be the result of an API change in DcmFileFormat::convertCharacterSet(), see http://git.dcmtk.org/?p=dcmtk.git;a=com ... 48c#patch3.

Btw, why do you use an old DCMTK snapshot (3.6.1) and not the current release 3.6.3 (or at least the latest major release 3.6.2).

EL_DCMTK
Posts: 2
Joined: Wed, 2018-03-07, 09:03

Re: linker errors dcmtk visual studio 2017

#3 Post by EL_DCMTK » Wed, 2018-03-07, 11:36

you were right, there was a conflict between header definition and built lib, thank you :)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest