dcmtk-3.6.1_20140617 64 bit with MacOsX 10.9.5

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
paolom
Posts: 169
Joined: Tue, 2008-09-16, 15:02

dcmtk-3.6.1_20140617 64 bit with MacOsX 10.9.5

#1 Post by paolom »

Hi,
I try to compile dcmtk-3.6.1_20140617 to 64 bit on Mac Os X 10.9.5 and it works.

When I try to create a Qt Project I receive this errors:

Code: Select all

Undefined symbols for architecture x86_64:
"std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::compare(char const*) const", referenced from:
dcmtk::log4cplus::internal::parse_bool(bool&, OFString const&) in liboflog.a(env.o)
"std::__1::__basic_string_common<true>::__throw_length_error() const", referenced from:
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdcmimage.a(diregist.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdcmimage.a(dihsvimg.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdcmimage.a(dirgbimg.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdcmimage.a(diybrimg.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdcmimage.a(diargimg.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdcmimage.a(dicmyimg.o)
std::__1::basic_stringbuf<char, std::__1::char_traits<char>, std::__1::allocator<char> >::str() const in libdcmimage.a(diyf2img.o)
I recompile dcmtk-3.6.1_20140617 with HAVE_STD and HAVE_STD_STRING defined but now I receive these errors:

Code: Select all

Undefined symbols for architecture x86_64:
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::at(unsigned long) const", referenced from:
      OFStandard::checkForMarkupConversion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, unsigned long) in libofstd.a(ofstd.o)
      OFStandard::convertToMarkupStream(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, OFStandard::E_MarkupMode, bool, unsigned long) in libofstd.a(ofstd.o)
      OFStandard::checkForOctalConversion(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long) in libofstd.a(ofstd.o)
      OFStandard::convertToOctalStream(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long) in libofstd.a(ofstd.o)
      OFStandard::decodeBase64(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned char*&) in libofstd.a(ofstd.o)
      DcmCodeString::checkVR(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long*, bool) in libdcmdata.a(dcvrcs.o)
      OFDateTime::setISOFormattedDateTime(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libofstd.a(ofdatime.o)
      ...
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char const*, unsigned long, unsigned long) const", referenced from:
      DcmTime::getOFTimeFromString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, OFTime&, bool) in libdcmdata.a(dcvrtm.o)
      DcmTime::getISOFormattedTimeFromString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool, bool, bool, bool) in libdcmdata.a(dcvrtm.o)
      dcmtk::log4cplus::(anonymous namespace)::substVars(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, dcmtk::log4cplus::helpers::Properties const&, dcmtk::log4cplus::helpers::LogLog&, unsigned int) in liboflog.a(config.o)
      dcmtk::log4cplus::spi::StringMatchFilter::decide(dcmtk::log4cplus::spi::InternalLoggingEvent const&) const in liboflog.a(filter.o)
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::find(char, unsigned long) const", referenced from:
      DcmByteString::verify(bool) in libdcmdata.a(dcbytstr.o)
      normalizeString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool, bool, bool, char) in libdcmdata.a(dcbytstr.o)
      DcmByteString::checkStringValue(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, unsigned long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libdcmdata.a(dcbytstr.o)
      OFStandard::decodeBase64(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned char*&) in libofstd.a(ofstd.o)
      DcmDateTime::checkStringValue(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libdcmdata.a(dcvrdt.o)
      DcmCharString::verify(bool) in libdcmdata.a(dcchrstr.o)
      DcmPersonName::checkStringValue(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libdcmdata.a(dcvrpn.o)
      ...
I've read others posts on this forum but I can't find the solution. Can anybody help me?
Thanks

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

Re: dcmtk-3.6.1_20140617 64 bit with MacOsX 10.9.5

#2 Post by Jan Schlamelcher »

std::basic_string is part of the STL and therefore part of your compiler. I can imagine two reasons for this kind of problem:
  1. You are using a custom compiler that was configured incorrectly during build.
  2. DCMTK was compiled with different (incompatible) flags than what the QT project is using, especially flags like "-lstdc++".

nedjoestut
Posts: 7
Joined: Fri, 2015-05-22, 15:51

Re: dcmtk-3.6.1_20140617 64 bit with MacOsX 10.9.5

#3 Post by nedjoestut »

Dear Paolom

Altho I have no interest in qt (yet), I failed to compile the latest (2015) snapshot on my mac mini MACOS 10.10.3. I would hope (if you retained a listing of your terminal commands to get the compilation "to work" with your 2014 snapshot), that there would be no problem for you to forward a copy of your terminal commandsto me at joel.stutman @gmail.com. Since you have been successful with thes, perhaps I would be also even with MACOS 10.10.3 and XCODE 6.3.2. I would appreciate your help...Thank you for listening. nedjoestut

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

Re: dcmtk-3.6.1_20140617 64 bit with MacOsX 10.9.5

#4 Post by Jan Schlamelcher »

We use the following commands to build for Mac OS X 10.10.2 (Apple LLVM version 6.0) in our nightlybuilds:

Code: Select all

cd <build-directory>
cmake -G "Unix Makefiles" <path-to-source-code-directory>
make
EDIT: I was just told we are also using Mac OS X 10.10.3, the wiki page I copied the information from was outdated.

nedjoestut
Posts: 7
Joined: Fri, 2015-05-22, 15:51

Re: dcmtk-3.6.1_20140617 64 bit with MacOsX 10.9.5

#5 Post by nedjoestut »

Thank you Jan...that shuld work regardless of version!!?!!

NJS :!:

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

Re: dcmtk-3.6.1_20140617 64 bit with MacOsX 10.9.5

#6 Post by Jan Schlamelcher »

Thats how we've done it as long as the dashboard exist.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests