problem when adding openexr in kimageformat as plugin in QT
-
When I compile the imageformat it finds all the libraries but it does not give me the option to include the open exr. I need this to open these image formats on qt.
-
Are you trying to copy this under plugins/imageformats directory ? is this plugin developed as Qt image plugin (inherited from QImageIOPlugin) ?
-
@VRonin @dheerendra I've been taking a look, I've added the openexr lib but it did not work, it's giving this error
[ 1%] Automatic MOC for target kimg_exr
[ 1%] Built target kimg_exr_autogen
[ 3%] Building CXX object src/imageformats/CMakeFiles/kimg_exr.dir/exr.cpp.obj
[ 5%] Building CXX object src/imageformats/CMakeFiles/kimg_exr.dir/kimg_exr_autogen/mocs_compilation.cpp.obj
[ 6%] Linking CXX shared module ....\bin\imageformats\kimg_exr.dll
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj): In functionK_IStream::read(char*, int)': C:/Git/kimageformats/src/imageformats/exr.cpp:61: undefined reference to
Iex_2_3::throwErrnoExc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj): In functionEXRHandler::read(QImage*)': C:/Git/kimageformats/src/imageformats/exr.cpp:169: undefined reference to
Imf_2_3::globalThreadCount()'
C:/Git/kimageformats/src/imageformats/exr.cpp:169: undefined reference toImf_2_3::RgbaInputFile::RgbaInputFile(Imf_2_3::IStream&, int)' C:/Git/kimageformats/src/imageformats/exr.cpp:170: undefined reference to
Imf_2_3::RgbaInputFile::dataWindow() const'
C:/Git/kimageformats/src/imageformats/exr.cpp:178: undefined reference toImf_2_3::RgbaInputFile::setFrameBuffer(Imf_2_3::Rgba*, unsigned long long, unsigned long long)' C:/Git/kimageformats/src/imageformats/exr.cpp:179: undefined reference to
Imf_2_3::RgbaInputFile::readPixels(int, int)'C:/Git/kimageformats/src/imageformats/exr.cpp:169: undefined reference toImf_2_3::RgbaInputFile::~RgbaInputFile()' C:/Git/kimageformats/src/imageformats/exr.cpp:169: undefined reference to
Imf_2_3::RgbaInputFile::~RgbaInputFile()'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj): In functionEXRHandler::canRead(QIODevice*)': C:/Git/kimageformats/src/imageformats/exr.cpp:212: undefined reference to
Imf_2_3::isImfMagic(char const*)'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj): In functionIex_2_3::InputExc::InputExc(char const*)': C:/PROGRA~1/OpenEXR/include/OpenEXR/IexBaseExc.h:156: undefined reference to
Iex_2_3::BaseExc::BaseExc(char const*)'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj): In functionIex_2_3::InputExc::~InputExc()': C:/PROGRA~1/OpenEXR/include/OpenEXR/IexBaseExc.h:156: undefined reference to
Iex_2_3::BaseExc::~BaseExc()'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj): In functionK_IStream::K_IStream(QIODevice*, QByteArray const&)': C:/Git/kimageformats/src/imageformats/exr.cpp:40: undefined reference to
Imf_2_3::IStream::IStream(char const*)'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj):exr.cpp:(.rdata$_ZTV9K_IStream[_ZTV9K_IStream]+0x20): undefined reference toImf_2_3::IStream::isMemoryMapped() const' CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj):exr.cpp:(.rdata$_ZTV9K_IStream[_ZTV9K_IStream]+0x30): undefined reference to
Imf_2_3::IStream::readMemoryMapped(int)'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj): In functionK_IStream::~K_IStream()': C:/Git/kimageformats/src/imageformats/exr.cpp:36: undefined reference to
Imf_2_3::IStream::~IStream()'
CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj):exr.cpp:(.rdata$_ZTVN7Iex_2_38InputExcE[_ZTVN7Iex_2_38InputExcE]+0x20): undefined reference toIex_2_3::BaseExc::what() const' CMakeFiles\kimg_exr.dir/objects.a(exr.cpp.obj):exr.cpp:(.rdata$.refptr._ZN4half8_toFloatE[.refptr._ZN4half8_toFloatE]+0x0): undefined reference to
half::_toFloat'
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[2]: *** [src\imageformats\CMakeFiles\kimg_exr.dir\build.make:107: bin/imageformats/kimg_exr.dll] Error 1
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:200: src/imageformats/CMakeFiles/kimg_exr.dir/all] Error 2
mingw32-make.exe: *** [Makefile:140: all] Error 2