I tried to embed use the Imebra library as Dicom file viewer in my iOS app. But when I built the Imebra library via "cmake --build ." on command line after "cmake install...", Errors came out as the following
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
imebra::charsetConversionIconv::myIconv(void*, char*, unsigned long) const in charsetConversionIconvImpl.cpp.o
"_iconv_close", referenced from:
imebra::charsetConversionIconv::~charsetConversionIconv() in charsetConversionIconvImpl.cpp.o
"_iconv_open", referenced from:
imebra::charsetConversionIconv::charsetConversionIconv(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in charsetConversionIconvImpl.cpp.o
Can someone help me with it?
The cmake file does not specify the iconv library when it selects it by default. Try launching cmake explicitly specifying iconv:
UPDATE
A bug in the CMakeLists.txt has been fixed in version 4.0.5.3 of the library.
Basically, while explicitly linking to iconv on Linux causes the build to fail, the opposite is true on OS-X. The resolution consisted in explicitly linking to iconv when running the build on OS-X.