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)
...
Compilation error with "diregist.h"
Moderator: Moderator Team
Compilation error with "diregist.h"
When i include "dcmtk/dcmimage/diregist.h" in my Qt project i get this errors:
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Compilation error with "diregist.h"
Did you compile DCMTK with HAVE_STL and/or HAVE_STD_STRING defined?
Re: Compilation error with "diregist.h"
I compile DCMTK with standard MakefileJ. Riesmeier wrote:Did you compile DCMTK with HAVE_STL and/or HAVE_STD_STRING defined?
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Compilation error with "diregist.h"
More details would be helpful... So, as far as I understood, you successfully compiled and installed DCMTK with default settings?
Re: Compilation error with "diregist.h"
I use OS X, I successfully compile and installed DCMTK with `make`. I can compile console app with this library ( and with "diregist.h" ), but in Qt ( I build GUI app ) I get the error.J. Riesmeier wrote:More details would be helpful... So, as far as I understood, you successfully compiled and installed DCMTK with default settings?
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Compilation error with "diregist.h"
... then the compiler/linker settings are apparently different for your Qt project (compared to the ones of the DCMTK).
I would suggest that you "google" for the linker error, and get something like this: "I suspect this issue is because of the two C++ runtime libraries available under OS X..."
I would suggest that you "google" for the linker error, and get something like this: "I suspect this issue is because of the two C++ runtime libraries available under OS X..."
Re: Compilation error with "diregist.h"
J. Riesmeier wrote:... then the compiler/linker settings are apparently different for your Qt project (compared to the ones of the DCMTK).
I would suggest that you "google" for the linker error, and get something like this: "I suspect this issue is because of the two C++ runtime libraries available under OS X..."
Update:clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
i was edit pro file:
Now error the same...macx {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
}
unix {
QMAKE_CXXFLAGS += -stdlib=libc++
LIBS += -L/usr/local/lib -lz -lijg8 -lijg12 -lijg16 -ltiff -lpng -lofstd -loflog -ldcmdata -ldcmimgle -ldcmimage -ldcmjpeg
INCLUDEPATH = /usr/local/include
}...
-
- DCMTK Developer
- Posts: 2512
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Compilation error with "diregist.h"
... but you were not recompiling the DCMTK with these settings, right? You should also consider that by default DCMTK uses its own classes for strings, lists and so on. See compiler macros HAVE_STL and HAVE_STD_STRING, which are described in DCMTK's documentation.
Btw, the order of libraries to be linked to a program is usually significant!
Btw, the order of libraries to be linked to a program is usually significant!
Re: Compilation error with "diregist.h"
Order of libraries is right.J. Riesmeier wrote:... but you were not recompiling the DCMTK with these settings, right? You should also consider that by default DCMTK uses its own classes for strings, lists and so on. See compiler macros HAVE_STL and HAVE_STD_STRING, which are described in DCMTK's documentation.
Btw, the order of libraries to be linked to a program is usually significant!
Who is online
Users browsing this forum: No registered users and 0 guests