Minimal example (Linux) application using DCMTK with linking errors

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
zardoz
Posts: 9
Joined: Mon, 2023-03-06, 09:29

Re: Minimal example (Linux) application using DCMTK with linking errors

#16 Post by zardoz »

Hi Marco,

just some feedback ... I tried to compile the current master branch from GitHub with DCMTK_PORTABLE_LINUX_BINARIES turned on. DCMTK_ENABLE_CHARSET_CONVERSION was set to "oficonv" by default, but DCMTK still failed to compile (error message below). But after turning off DCMTK_WITH_ICU and(!) DCMTK_WITH_XML it successfully compiled. So it seems XML support somehow depends on ICU.

Code: Select all

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libicuuc.a(putil.ao): in function `uprv_dl_open_66':
(.text+0x1946): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libdl.a(dlopen.o): in function `dlopen':
(.text+0x9): undefined reference to `__dlopen'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libdl.a(dlclose.o): in function `dlclose':
(.text+0x5): undefined reference to `__dlclose'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libdl.a(dlsym.o): in function `dlsym':
(.text+0x9): undefined reference to `__dlsym'
collect2: error: ld returned 1 exit status
make[2]: *** [dcmdata/apps/CMakeFiles/xml2dcm.dir/build.make:99: bin/xml2dcm] Error 1
make[1]: *** [CMakeFiles/Makefile2:3281: dcmdata/apps/CMakeFiles/xml2dcm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

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

Re: Minimal example (Linux) application using DCMTK with linking errors

#17 Post by Marco Eichelberg »

Yes, this is possible. libxml2, which is used by some DCMTK tools, can be compiled with character set conversion support based on GNU iconv or ICU. In that case linking against libxml2 causes the dependency on ICU.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest