Static linking an c++ application with DCMTK

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
y.caspi
Posts: 4
Joined: Tue, 2017-07-04, 09:27

Static linking an c++ application with DCMTK

#1 Post by y.caspi » Tue, 2017-07-04, 12:33

I have a short application that I wrote in c++ that makes use of some of the DCMTK tools. The application is written on Ubuntu 16.04.

I included in my .h file the following:

#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmdata/dctk.h"

When I compile it and link it to the dynamically link libraries (by this order: libdcmdata and then libofstd) The compilation works ok and the application runs smoothly.

However, I would like to make my application a stand alone one and thus would like to link it statically to the DCMTK libraries. When I try to link the application against the static libraries libdcmdata.a and libofstd.a that were created during the compilation of DCMTK from source, I get a list of errors such as (for libofstd.a):

ofchrenc.cc:(.text+0x5d9): undefined reference to `ucnv_open_55'
ofchrenc.cc:(.text+0x601): undefined reference to `UCNV_TO_U_CALLBACK_STOP_55'
ofchrenc.cc:(.text+0x609): undefined reference to `ucnv_setToUCallBack_55'
ofchrenc.cc:(.text+0x644): undefined reference to `ucnv_open_55'
ofchrenc.cc:(.text+0x66c): undefined reference to `UCNV_FROM_U_CALLBACK_STOP_55

and (for libdcmdata.a):

dcitem.cc:(.text+0x15fe): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x160b): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x16e2): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x1734): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x1746): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x17b1): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'

So what should I do in order to link the application statically against DCMTK?

Yaron

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 306
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Static linking an c++ application with DCMTK

#2 Post by Jan Schlamelcher » Tue, 2017-07-04, 13:38

It seems that you configured DCMTK to use the ICU library for character set conversions. That means you will also have to link the ICU library to your application.

y.caspi
Posts: 4
Joined: Tue, 2017-07-04, 09:27

Re: Static linking an c++ application with DCMTK

#3 Post by y.caspi » Tue, 2017-07-04, 18:25

After trying to follow the advice below, I still experience problems.
Thus, as an exercise, I tried to statically compile the example that you give on your website:
http://support.dcmtk.org/redmine/projec ... MetaHeader

And also to this example, the same problem occurs.

I called the cpp file that contains this example DCMread. In order to compile it I use:

g++ -Wall -std=c++11 -fPIC -I/media/ycaspi/Data/Laptop\ Backup/C++/DCMRead -c /media/ycaspi/Data/Laptop\ Backup/C++/DCMRead/DCMread.cpp -o obj/Release/DCMread.o

and to link it I use:

g++ -o bin/Release/DCMread obj/Release/DCMread.o -pie -lpthread /usr/local/zlib-1.2.11/libz.a /usr/lib/x86_64-linux-gnu/libicudata.a /usr/lib/x86_64-linux-gnu/libicuio.a /usr/lib/x86_64-linux-gnu/libicule.a /usr/lib/x86_64-linux-gnu/libiculx.a /usr/lib/x86_64-linux-gnu/libicutu.a /usr/lib/x86_64-linux-gnu/libicutest.a /usr/lib/x86_64-linux-gnu/libicuuc.a /usr/local/lib/libdcmdata.a /usr/local/lib/libofstd.a

However, I get the following error from the linking process:

/usr/bin/ld: /usr/local/lib/libdcmdata.a(dcitem.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libdcmdata.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

If I try to change the -pie flag to -pie -static I get the following error:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginT.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/crtbeginT.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

and if I just use -static as a linking flag I get a long list of errors (I attach part of it as otherwise I ecxeed the allowed number of characters):

/usr/local/lib/libofstd.a(ofstd.o): In function `OFStandard::getGrNam(char const*)':
ofstd.cc:(.text+0x4724): warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/libofstd.a(ofstd.o): In function `OFStandard::getPwNam(char const*)':
ofstd.cc:(.text+0x3786): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/libofstd.a(ofstd.o): In function `OFStandard::getHostByAddr(char const*, int, int)':
ofstd.cc:(.text+0x4c58): warning: Using 'gethostbyaddr_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/libofstd.a(ofstd.o): In function `OFStandard::getHostByName(char const*)':
ofstd.cc:(.text+0x54bb): warning: Using 'gethostbyname_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(eh_alloc.o): In function `(anonymous namespace)::pool::free(void*) [clone .constprop.2]':
/usr/local/lib/libdcmdata.a(dcitem.o): In function `DcmItem::getParentItem()':
dcitem.cc:(.text+0x15fe): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x160b): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x16e2): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x1734): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x1746): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x17b1): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcitem.o): In function `DcmItem::insert(DcmElement*, bool, bool)':
dcitem.cc:(.text+0x1ce0): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x1ced): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x1d68): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x1da9): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x1db6): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x1e85): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x1ed1): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x1ede): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x1fcb): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x2072): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x207f): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x20fa): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x213b): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x2148): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x2217): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x2263): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x2270): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x235d): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x23dc): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x23e9): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x24d8): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x2533): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x2540): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x262a): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcitem.cc:(.text+0x2676): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcitem.cc:(.text+0x2683): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcitem.cc:(.text+0x2770): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dctypes.o): In function `_GLOBAL__sub_I_DCM_dcmdataLogger':
dctypes.cc:(.text+0x3d): undefined reference to `OFLog::getLogger(char const*)'
/usr/local/lib/libdcmdata.a(dctypes.o): In function `OFLogger::~OFLogger()':
dctypes.cc:(.text._ZN8OFLoggerD2Ev[_ZN8OFLoggerD5Ev]+0xc): undefined reference to `dcmtk::log4cplus::Logger::~Logger()'
/usr/local/lib/libdcmdata.a(dctypes.o): In function `OFLogger::~OFLogger()':
dctypes.cc:(.text._ZN8OFLoggerD0Ev[_ZN8OFLoggerD5Ev]+0xc): undefined reference to `dcmtk::log4cplus::Logger::~Logger()'
/usr/local/lib/libdcmdata.a(dctypes.o):(.rodata._ZTI8OFLogger[_ZTI8OFLogger]+0x10): undefined reference to `typeinfo for dcmtk::log4cplus::Logger'
/usr/local/lib/libdcmdata.a(dctypes.o):(.rodata._ZTV8OFLogger[_ZTV8OFLogger]+0x10): undefined reference to `dcmtk::log4cplus::Logger::addAppender(dcmtk::log4cplus::helpers::SharedObjectPtr<dcmtk::log4cplus::Appender>)'
/usr/local/lib/libdcmdata.a(dctypes.o):(.rodata._ZTV8OFLogger[_ZTV8OFLogger]+0x18): undefined reference to `dcmtk::log4cplus::Logger::getAllAppenders()'
/usr/local/lib/libdcmdata.a(dctypes.o):(.rodata._ZTV8OFLogger[_ZTV8OFLogger]+0x20): undefined reference to `dcmtk::log4cplus::Logger::getAppender(OFString const&)'
/usr/local/lib/libdcmdata.a(dctypes.o):(.rodata._ZTV8OFLogger[_ZTV8OFLogger]+0x28): undefined reference to `dcmtk::log4cplus::Logger::removeAllAppenders()'
/usr/local/lib/libdcmdata.a(dctypes.o):(.rodata._ZTV8OFLogger[_ZTV8OFLogger]+0x30): undefined reference to `dcmtk::log4cplus::Logger::removeAppender(dcmtk::log4cplus::helpers::SharedObjectPtr<dcmtk::log4cplus::Appender>)'
/usr/local/lib/libdcmdata.a(dctypes.o):(.rodata._ZTV8OFLogger[_ZTV8OFLogger]+0x38): undefined reference to `dcmtk::log4cplus::Logger::removeAppender(OFString const&)'
/usr/local/lib/libdcmdata.a(dcistrmz.o): In function `DcmZLibInputFilter::~DcmZLibInputFilter()':
dcistrmz.cc:(.text+0x94): undefined reference to `inflateEnd'
/usr/local/lib/libdcmdata.a(dcistrmz.o): In function `DcmZLibInputFilter::DcmZLibInputFilter()':
dcistrmz.cc:(.text+0x2bc): undefined reference to `inflateInit_'
dcistrmz.cc:(.text+0x3c6): undefined reference to `inflateInit2_'
/usr/local/lib/libdcmdata.a(dcistrmz.o): In function `DcmZLibInputFilter::decompress(void const*, long)':
dcistrmz.cc:(.text+0x710): undefined reference to `inflate'
dcistrmz.cc:(.text+0x82f): undefined reference to `inflate'
/usr/local/lib/libdcmdata.a(dcostrmz.o): In function `DcmZLibOutputFilter::~DcmZLibOutputFilter()':
dcostrmz.cc:(.text+0xb8): undefined reference to `deflateEnd'
/usr/local/lib/libdcmdata.a(dcostrmz.o): In function `DcmZLibOutputFilter::DcmZLibOutputFilter()':
dcostrmz.cc:(.text+0x23f): undefined reference to `deflateInit2_'
/usr/local/lib/libdcmdata.a(dcostrmz.o): In function `DcmZLibOutputFilter::compress(void const*, long, bool)':
dcostrmz.cc:(.text+0x5a1): undefined reference to `deflate'
dcostrmz.cc:(.text+0x6bc): undefined reference to `deflate'
/usr/local/lib/libdcmdata.a(dcpixseq.o): In function `DcmPixelSequence::insert(DcmPixelItem*, unsigned long)':
dcpixseq.cc:(.text+0xa29): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcpixseq.cc:(.text+0xa36): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcpixseq.cc:(.text+0xd0f): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcpixseq.cc:(.text+0xd6b): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcpixseq.cc:(.text+0xd78): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcpixseq.cc:(.text+0x1034): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcpixseq.cc:(.text+0x108b): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcpixseq.cc:(.text+0x1098): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcpixseq.cc:(.text+0x13ec): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcpxitem.o): In function `DcmPixelItem::createOffsetTable(OFList<unsigned int> const&)':
dcpxitem.cc:(.text+0x82e): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcpxitem.cc:(.text+0x83b): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcpxitem.cc:(.text+0xb74): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcpxitem.cc:(.text+0xc1a): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcpxitem.cc:(.text+0xc27): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcpxitem.cc:(.text+0xf5b): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcpxitem.o): In function `DcmPixelItem::getParentItem()':
dcpxitem.cc:(.text+0x1318): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcpxitem.cc:(.text+0x1325): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcpxitem.cc:(.text+0x1687): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcpxitem.cc:(.text+0x16d9): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcpxitem.cc:(.text+0x16eb): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcpxitem.cc:(.text+0x19a1): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcuid.o): In function `addUIDComponent(char*, char const*)':
dcuid.cc:(.text+0x2bb): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcuid.cc:(.text+0x2c8): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcuid.cc:(.text+0x585): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcobject.o): In function `DcmObject::getRootItem()':
dcobject.cc:(.text+0xcf6): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcobject.cc:(.text+0xd03): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcobject.cc:(.text+0x1066): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcobject.o): In function `DcmObject::getParentItem()':
dcobject.cc:(.text+0x117c): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcobject.cc:(.text+0x1190): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcobject.cc:(.text+0x14f6): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcobject.o): In function `DcmObject::writeTagAndLength(DcmOutputStream&, E_TransferSyntax, unsigned int&) const':
dcobject.cc:(.text+0x1c4e): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcobject.cc:(.text+0x1c5b): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcobject.cc:(.text+0x1fca): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcelem.o): In function `DcmElement::newValueField()':
dcelem.cc:(.text+0x3c42): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x3c4f): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x3fa4): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcelem.o): In function `DcmElement::compact()':
dcelem.cc:(.text+0x41f4): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x4201): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x44f9): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcelem.o): In function `DcmElement::loadValue(DcmInputStream*)':
dcelem.cc:(.text+0x48c4): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x48d1): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x4c76): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcelem.o): In function `DcmElement::getPartialValue(void*, unsigned int, unsigned int, DcmFileCache*, E_ByteOrder)':
dcelem.cc:(.text+0x5d0c): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x5d19): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x5d9c): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcelem.cc:(.text+0x5dfe): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x5e0b): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x5e87): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcelem.o): In function `DcmElement::canWriteXfer(E_TransferSyntax, E_TransferSyntax)':
dcelem.cc:(.text+0x6849): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x685d): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x6bcc): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcelem.o): In function `DcmElement::read(DcmInputStream&, E_TransferSyntax, E_GrpLenEncoding, unsigned int)':
dcelem.cc:(.text+0x6f11): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x6f1e): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x72ea): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcelem.cc:(.text+0x7473): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x7480): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x782a): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcelem.o): In function `DcmElement::writeXMLStartTag(std::ostream&, unsigned long, char const*)':
dcelem.cc:(.text+0x7f37): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcelem.cc:(.text+0x7f44): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcelem.cc:(.text+0x8340): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcdatset.o): In function `DcmDataset::chooseRepresentation(E_TransferSyntax, DcmRepresentationParameter const*)':
dcdatset.cc:(.text+0x16e5): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x16f2): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x19dd): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcdatset.o): In function `DcmDataset::updateOriginalXfer()':
dcdatset.cc:(.text+0x1db7): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x1dc4): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x209a): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcdatset.o): In function `DcmDataset::doPostReadChecks()':
dcdatset.cc:(.text+0x22a2): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x22af): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x2629): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x26d4): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x26e1): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x2a2b): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcdatset.o): In function `DcmDataset::removeInvalidGroups(bool)':
dcdatset.cc:(.text+0x2c13): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x2c20): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x2f4f): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x305c): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x3069): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x3398): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x3429): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x3436): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x3746): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcdatset.o): In function `DcmDataset::read(DcmInputStream&, E_TransferSyntax, E_GrpLenEncoding, unsigned int)':
dcdatset.cc:(.text+0x3c5a): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x3c67): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x3f2e): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x3f86): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x3f93): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x4008): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x406b): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x4078): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x4334): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x4388): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x4395): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x440a): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x445f): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x446c): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x44d6): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x452f): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x453c): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x4887): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdatset.cc:(.text+0x4bbd): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdatset.cc:(.text+0x4bca): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdatset.cc:(.text+0x4ed7): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcchrstr.o): In function `DcmCharString::verify(bool)':
dcchrstr.cc:(.text+0x600): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcchrstr.cc:(.text+0x60d): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcchrstr.cc:(.text+0xa84): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcchrstr.cc:(.text+0xb32): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcchrstr.cc:(.text+0xb3f): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcchrstr.cc:(.text+0xe63): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcchrstr.cc:(.text+0xeda): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcchrstr.cc:(.text+0xee7): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcchrstr.cc:(.text+0x1251): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcchrstr.o): In function `DcmCharString::getSpecificCharacterSet(OFString&)':
dcchrstr.cc:(.text+0x1596): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcchrstr.cc:(.text+0x15a3): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcchrstr.cc:(.text+0x1930): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcchrstr.o): In function `DcmCharString::convertCharacterSet(DcmSpecificCharacterSet&)':
dcchrstr.cc:(.text+0x1b74): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcchrstr.cc:(.text+0x1b81): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcchrstr.cc:(.text+0x1f4d): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcchrstr.cc:(.text+0x2028): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcchrstr.cc:(.text+0x2035): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcchrstr.cc:(.text+0x23b6): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcdict.o): In function `parseTagPart(char*, unsigned int&, unsigned int&, DcmDictRangeRestriction&)':
dcdict.cc:(.text+0xbf1): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdict.cc:(.text+0xbfe): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0xed7): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libdcmdata.a(dcdict.o): In function `DcmDataDictionary::loadDictionary(char const*, bool)':
dcdict.cc:(.text+0x10c1): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdict.cc:(.text+0x10d4): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0x1442): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdict.cc:(.text+0x1499): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdict.cc:(.text+0x14a6): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0x1814): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdict.cc:(.text+0x1996): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdict.cc:(.text+0x19a3): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0x1d51): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdict.cc:(.text+0x1d9f): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdict.cc:(.text+0x1dac): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0x215a): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdict.cc:(.text+0x2366): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0x279b): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdict.cc:(.text+0x2b28): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0x2f5d): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdict.cc:(.text+0x2fcd): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdict.cc:(.text+0x2fda): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
dcdict.cc:(.text+0x33e2): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
dcdict.cc:(.text+0x37aa): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
dcdict.cc:(.text+0x37d9): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
/usr/local/lib/libdcmdata.a(vrscan.o): In function `vrscan::scan(OFString const&, OFString const&)':
vrscan.cc:(.text+0xc0): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
vrscan.cc:(.text+0xcd): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
vrscan.cc:(.text+0x44d): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
vrscan.cc:(.text+0x4ed): undefined reference to `dcmtk::log4cplus::Logger::isEnabledFor(int) const'
vrscan.cc:(.text+0x4fa): undefined reference to `dcmtk::log4cplus::detail::get_macro_body_oss[abi:cxx11]()'
vrscan.cc:(.text+0x869): undefined reference to `dcmtk::log4cplus::detail::macro_forced_log(dcmtk::log4cplus::Logger const&, int, OFString const&, char const*, int, char const*)'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFThread::start()':
ofthread.cc:(.text+0x65): undefined reference to `pthread_create'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFThread::join()':
ofthread.cc:(.text+0xbe): undefined reference to `pthread_join'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFThread::thread_exit()':
ofthread.cc:(.text+0xf4): undefined reference to `pthread_exit'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFThread::self()':
ofthread.cc:(.text+0xfd): undefined reference to `pthread_self'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFThreadSpecificData::OFThreadSpecificData()':
ofthread.cc:(.text+0x1a5): undefined reference to `pthread_key_create'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFThreadSpecificData::set(void*)':
ofthread.cc:(.text+0x1f0): undefined reference to `pthread_setspecific'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFThreadSpecificData::get(void*&)':
ofthread.cc:(.text+0x209): undefined reference to `pthread_getspecific'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFSemaphore::OFSemaphore(unsigned int)':
ofthread.cc:(.text+0x2c9): undefined reference to `sem_init'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFSemaphore::~OFSemaphore()':
ofthread.cc:(.text+0x2f3): undefined reference to `sem_destroy'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFSemaphore::wait()':
ofthread.cc:(.text+0x31c): undefined reference to `sem_wait'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFSemaphore::trywait()':
ofthread.cc:(.text+0x344): undefined reference to `sem_trywait'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFSemaphore::post()':
ofthread.cc:(.text+0x36c): undefined reference to `sem_post'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFMutex::OFMutex()':
ofthread.cc:(.text+0x421): undefined reference to `pthread_mutex_init'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFMutex::~OFMutex()':
ofthread.cc:(.text+0x44b): undefined reference to `pthread_mutex_destroy'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFMutex::lock()':
ofthread.cc:(.text+0x474): undefined reference to `pthread_mutex_lock'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFMutex::trylock()':
ofthread.cc:(.text+0x490): undefined reference to `pthread_mutex_trylock'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFMutex::unlock()':
ofthread.cc:(.text+0x4ac): undefined reference to `pthread_mutex_unlock'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFReadWriteLock::OFReadWriteLock()':
ofthread.cc:(.text+0x555): undefined reference to `pthread_rwlock_init'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFReadWriteLock::~OFReadWriteLock()':
ofthread.cc:(.text+0x57f): undefined reference to `pthread_rwlock_destroy'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFReadWriteLock::rdlock()':
ofthread.cc:(.text+0x5a8): undefined reference to `pthread_rwlock_rdlock'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFReadWriteLock::wrlock()':
ofthread.cc:(.text+0x5c4): undefined reference to `pthread_rwlock_wrlock'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFReadWriteLock::tryrdlock()':
ofthread.cc:(.text+0x5e0): undefined reference to `pthread_rwlock_tryrdlock'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFReadWriteLock::trywrlock()':
ofthread.cc:(.text+0x5fc): undefined reference to `pthread_rwlock_trywrlock'
/usr/local/lib/libofstd.a(ofthread.o): In function `OFReadWriteLock::unlock()':
ofthread.cc:(.text+0x618): undefined reference to `pthread_rwlock_unlock'
/usr/local/lib/libofstd.a(ofchrenc.o): In function `OFCharacterEncoding::getLocaleEncoding()':
ofchrenc.cc:(.text+0x106): undefined reference to `ucnv_open_55'
ofchrenc.cc:(.text+0x127): undefined reference to `ucnv_getName_55'
ofchrenc.cc:(.text+0x13c): undefined reference to `ucnv_close_55'
/usr/local/lib/libofstd.a(ofchrenc.o): In function `OFCharacterEncoding::~OFCharacterEncoding()':
ofchrenc.cc:(.text+0x213): undefined reference to `ucnv_close_55'
ofchrenc.cc:(.text+0x21c): undefined reference to `ucnv_close_55'
/usr/local/lib/libofstd.a(ofchrenc.o): In function `OFCharacterEncoding::operator=(OFCharacterEncoding const&)':
ofchrenc.cc:(.text+0x27b): undefined reference to `ucnv_close_55'
ofchrenc.cc:(.text+0x284): undefined reference to `ucnv_close_55'
/usr/local/lib/libofstd.a(ofchrenc.o):ofchrenc.cc:(.text+0x336): more undefined references to `ucnv_close_55' follow
/usr/local/lib/libofstd.a(ofchrenc.o): In function `OFCharacterEncoding::getConversionFlags() const':
ofchrenc.cc:(.text+0x3aa): undefined reference to `ucnv_getFromUCallBack_55'
ofchrenc.cc:(.text+0x3b5): undefined reference to `UCNV_FROM_U_CALLBACK_STOP_55'
ofchrenc.cc:(.text+0x3bd): undefined reference to `UCNV_FROM_U_CALLBACK_SKIP_55'
/usr/local/lib/libofstd.a(ofchrenc.o): In function `OFCharacterEncoding::setConversionFlags(unsigned int)':
ofchrenc.cc:(.text+0x444): undefined reference to `UCNV_FROM_U_CALLBACK_STOP_55'
ofchrenc.cc:(.text+0x449): undefined reference to `ucnv_setFromUCallBack_55'
ofchrenc.cc:(.text+0x46e): undefined reference to `UCNV_TO_U_CALLBACK_STOP_55'
ofchrenc.cc:(.text+0x477): undefined reference to `ucnv_setToUCallBack_55'
ofchrenc.cc:(.text+0x49f): undefined reference to `UCNV_FROM_U_CALLBACK_SKIP_55'
ofchrenc.cc:(.text+0x4a4): undefined reference to `ucnv_setFromUCallBack_55'
ofchrenc.cc:(.text+0x4c5): undefined reference to `UCNV_TO_U_CALLBACK_SKIP_55'
ofchrenc.cc:(.text+0x4ce): undefined reference to `ucnv_setToUCallBack_55'
/usr/local/lib/libofstd.a(ofchrenc.o): In function `OFCharacterEncoding::selectEncoding(OFString const&, OFString const&)':
ofchrenc.cc:(.text+0x5d9): undefined reference to `ucnv_open_55'
ofchrenc.cc:(.text+0x601): undefined reference to `UCNV_TO_U_CALLBACK_STOP_55'
ofchrenc.cc:(.text+0x609): undefined reference to `ucnv_setToUCallBack_55'
ofchrenc.cc:(.text+0x644): undefined reference to `ucnv_open_55'
ofchrenc.cc:(.text+0x66c): undefined reference to `UCNV_FROM_U_CALLBACK_STOP_55'
ofchrenc.cc:(.text+0x674): undefined reference to `ucnv_setFromUCallBack_55'
ofchrenc.cc:(.text+0x6f4): undefined reference to `ucnv_close_55'
ofchrenc.cc:(.text+0x6fc): undefined reference to `ucnv_close_55'
ofchrenc.cc:(.text+0x75a): undefined reference to `ucnv_close_55'
ofchrenc.cc:(.text+0x762): undefined reference to `ucnv_close_55'
ofchrenc.cc:(.text+0x76b): undefined reference to `u_errorName_55'
ofchrenc.cc:(.text+0x852): undefined reference to `ucnv_close_55'
ofchrenc.cc:(.text+0x85b): undefined reference to `ucnv_close_55'
/usr/local/lib/libofstd.a(ofchrenc.o): In function `OFCharacterEncoding::Implementation::convert(OFString&, char const*, unsigned long)':
ofchrenc.cc:(.text._ZN19OFCharacterEncoding14Implementation7convertER8OFStringPKcm[_ZN19OFCharacterEncoding14Implementation7convertER8OFStringPKcm]+0xc9): undefined reference to `ucnv_convertEx_55'
ofchrenc.cc:(.text._ZN19OFCharacterEncoding14Implementation7convertER8OFStringPKcm[_ZN19OFCharacterEncoding14Implementation7convertER8OFStringPKcm]+0x15c): undefined reference to `ucnv_convertEx_55'
ofchrenc.cc:(.text._ZN19OFCharacterEncoding14Implementation7convertER8OFStringPKcm[_ZN19OFCharacterEncoding14Implementation7convertER8OFStringPKcm]+0x176): undefined reference to `u_errorName_55'
collect2: error: ld returned 1 exit status

So can you advice me how to statically link the DCMTK application to the above mentioned axample?

Yaron Caspi

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 306
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Static linking an c++ application with DCMTK

#4 Post by Jan Schlamelcher » Wed, 2017-07-05, 10:08

Perhaps have a look at how dcmtk links one of its own applications, e.g. storescu. If you are using CMake, after building DCMTK go to dcmnet/apps and execute 'make clean'. Then run 'make VERBOSE=1 storescu'. You should be able to see the exact command lines how storescu is compiled and linked.

y.caspi
Posts: 4
Joined: Tue, 2017-07-04, 09:27

Re: Static linking an c++ application with DCMTK

#5 Post by y.caspi » Wed, 2017-07-05, 17:59

I configured the DCMTK library with DCMTK_WITH_ICU and DCMTK_FORCE_FPIC_ON_UNIX
Then I run: make and make install

Next, I followed your advice.

The output is:

Building CXX object dcmnet/apps/CMakeFiles/storescu.dir/storescu.cc.o
cd /usr/lib/dcmtk/dcmnet/apps && /usr/bin/c++ -DDCMTK_BUILD_IN_PROGRESS -DUSE_NULL_SAFE_OFSTRING -D_REENTRANT -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/usr/include/libxml2 -I/usr/lib/dcmtk/config/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/ofstd/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/oflog/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmdata/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmimgle/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmimage/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmjpeg/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmjpls/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmtls/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmnet/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmsr/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmsign/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmwlm/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmqrdb/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmpstat/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmrt/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmiod/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmfg/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmseg/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmtract/include -I/home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmpmap/include -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -fPIC -O3 -DNDEBUG -DDCMTK_BUILD_DATE=\"2017-02-28\" -o CMakeFiles/storescu.dir/storescu.cc.o -c /home/ycaspi/Downloads/dcmtk-3.6.1_20170228/dcmnet/apps/storescu.cc
[100%] Linking CXX executable ../../bin/storescu
cd /usr/lib/dcmtk/dcmnet/apps && /usr/bin/cmake -E cmake_link_script CMakeFiles/storescu.dir/link.txt --verbose=1
/usr/bin/c++ -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -fPIC -O3 -DNDEBUG CMakeFiles/storescu.dir/storescu.cc.o -o ../../bin/storescu -rdynamic ../../lib/libdcmnet.a ../../lib/libdcmdata.a ../../lib/liboflog.a ../../lib/libofstd.a ../../lib/libdcmtls.a ../../lib/libdcmnet.a -lwrap ../../lib/libdcmdata.a ../../lib/liboflog.a /usr/local/lib/libz.so ../../lib/libofstd.a -licuuc -lpthread -lssl -lcrypto -Wl,-rpath,/usr/local/lib:
make[3]: Leaving directory '/usr/lib/dcmtk'
[100%] Built target storescu
make[2]: Leaving directory '/usr/lib/dcmtk'
/usr/bin/cmake -E cmake_progress_start /usr/lib/dcmtk/CMakeFiles 0
make[1]: Leaving directory '/usr/lib/dcmtk'

Does it help.

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 306
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Static linking an c++ application with DCMTK

#6 Post by Jan Schlamelcher » Thu, 2017-07-06, 11:58

That's for you to answer. One can see in that output that dcmtk links the following libraries in the following order:
../../lib/libdcmnet.a ../../lib/libdcmdata.a ../../lib/liboflog.a ../../lib/libofstd.a ../../lib/libdcmtls.a ../../lib/libdcmnet.a -lwrap ../../lib/libdcmdata.a ../../lib/liboflog.a /usr/local/lib/libz.so ../../lib/libofstd.a -licuuc -lpthread -lssl -lcrypto

y.caspi
Posts: 4
Joined: Tue, 2017-07-04, 09:27

Re: Static linking an c++ application with DCMTK

#7 Post by y.caspi » Thu, 2017-07-13, 13:26

The solution was in fact simple.

It turned out that on Ubuntu, the way ICU is built make it necessary to use the dynamically linked library libld. So it was impossible to link everything statically. However, by deactivating the ICU support in during the compilation of DCMTK, one can just add the flags for the statically DCMTK libraries as they a appear in the FAQ#27 viewtopic.php?f=4&t=36.

f.rupcich
Posts: 3
Joined: Mon, 2019-10-07, 15:52

Re: Static linking an c++ application with DCMTK

#8 Post by f.rupcich » Tue, 2019-10-08, 01:50

Hello,

I am having a very similar issue as to the original poster of this topic. In short, building dcmtk on Ubuntu 16.04 results in the below errors:

ofchrenc.cc:(.text+0xd07): undefined reference to `ucnv_open_55'
ofchrenc.cc:(.text+0xd27): undefined reference to `UCNV_TO_U_CALLBACK_STOP_55'
ofchrenc.cc:(.text+0xd2f): undefined reference to `ucnv_setToUCallBack_55'
ofchrenc.cc:(.text+0xd5c): undefined reference to `ucnv_open_55'

I do not have this issue on Ubuntu 18.04, however, for the current project we're stuck with 16.04, and thus we need dcmtk to build properly.

I was happy to find that y.caspi (the original poster) was able to find the following solution
However, by deactivating the ICU support in during the compilation of DCMTK, one can just add the flags for the statically DCMTK libraries as they a appear in the FAQ#27 viewtopic.php?f=4&t=36.
However, I do not know how to "deactivate" ICU support during compilation of DCMTK. Nor am I sure where/how to add the flags in the link that he references (in a cmake/makefile somewhere?). Below is the command I use to build dcmtk (directly from the install file).

mkdir dcmtk-gcc-`g++ -dumpversion`
cd dcmtk-gcc-<TAB>
cmake ../dcmtk-3.6.4
make -j8
make DESTDIR=../dcmtk-3.6.4-install install

Any suggestions as to how to fix deactivate ICU support and add the above flags during compilation would be greatly appreciated. Or if there are other ways to solve this issue...

Thanks,
Franco

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 306
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Static linking an c++ application with DCMTK

#9 Post by Jan Schlamelcher » Tue, 2019-10-08, 08:39

Well, deactivating the ICU support would be an option, see INSTALL for how to achieve that. However, if you need character set conversion support, you should instead try to fix those linker errors. DCMTK handles linking the required ICU libraries automatically, so, it seems strange that these errors can be perceived at all. I suggest that you have two different versions of ICU on you system. DCMTK compiles with header files from ICU version 55 and then tries to link against some other version of the ICU, where the symbols have another name. Try to correct your linker paths and/or your list include directories.

EDIT: I just read the post above: yes, a problem of mixing statically linked libraries with dynamically linked ones explains it as well. If you still want ICU support, there is always the option to compile it yourself from the sources whenever the package maintainer of your Linux distribution messed things up as it seems to be the case -- it's the Debian way.

f.rupcich
Posts: 3
Joined: Mon, 2019-10-07, 15:52

Re: Static linking an c++ application with DCMTK

#10 Post by f.rupcich » Tue, 2019-10-08, 17:11

Jan - thanks for the response. One thing I wanted to clarify was the errors did not occur during building of dcmtk itself - dcmtk builds just fine without issues. The error occur when building my application and linking to dcmtk. Sorry for the confusion.

In any case - I'll try some of your suggestions and let you know what I find.

Thanks,
Franco

f.rupcich
Posts: 3
Joined: Mon, 2019-10-07, 15:52

Re: Static linking an c++ application with DCMTK

#11 Post by f.rupcich » Thu, 2019-10-10, 00:15

An update - we got our application to compile after doing the following
  • Ran the command “apt list --installed” to see all of the installed packages on my machine
    Located the ICU libraries. There were two of them installed, named “libicu-dev” and “libicu55”.
    I uninstalled the “libicu-dev” library using the command “sudo apt remove libicu-dev”.
Maybe it would have been cleaner to disable it instead using the --disable-charconv flag as you originally suggested, Jan, but the above seemed like the quickest/easiest route given we're not using autoconf (and INSTALL file indicates it is deprecated).

Thanks again for the support, it is greatly appreciated.

Franco

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 306
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Static linking an c++ application with DCMTK

#12 Post by Jan Schlamelcher » Thu, 2019-10-10, 09:41

Dear Franco, the CMake option would be -DDCMTK_ENABLE_CHARSET_CONVERSION:BOOL=OFF

Post Reply

Who is online

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