Qt + GDCM problems with the libs

♀尐吖头ヾ 提交于 2019-12-24 13:08:21

问题


I'm trying to use the library gdcm in my project. However I'm with some problem.

gdcmGlobal.cxx:-1: error: undefined reference to gdcm::System::FileIsDirectory(char const*)' gdcmGlobal.cxx:-1: error: undefined reference togdcm::System::FileIsDirectory(char const*)' gdcmGlobal.cxx:-1: error: undefined reference to gdcm::System::FileExists(char const*)' :-1: error: C:\Program_Library\gdcm-2.0.18-mingw32\bin/libgdcmDICT.a(gdcmGlobal.cxx.obj): bad reloc address 0xf in section.text$ZNK4gdcm7Modules7IsEmptyEv[_ZNK4gdcm7Modules7IsEmptyEv]'

I included the libs:

LIBS += -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin" \ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmMSFF.a" \ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmCommon.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmDICT.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmDSED.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmexpat.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmIOD.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmjpeg8.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmjpeg12.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmjpeg16.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmopenjpeg.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmzlib.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmcharls.a"\ -L"C:\Program_Library\gdcm-2.0.18-mingw32\bin\libgdcmgetopt.a"

LIBS += -lgdcmMSFF -lgdcmCommon -lgdcmDICT -lgdcmDSED -lgdcmexpat -lgdcmIOD -lgdcmjpeg8 -lgdcmjpeg12 -lgdcmjpeg16 -lgdcmopenjpeg -lgdcmzlib -lgdcmcharls -lgdcmgetopt

Anybody would know what is happening? Thanks!


回答1:


Qt 5.1 uses g++ 4.8 and I used g++ 4.6 to compile gdcm! That is the problem! However when I included:

include < gdcmGlobal.h>

appear this error:

gdcmGlobal.cxx:-1: error: undefined reference to `gdcm::System::FileIsDirectory(char const*)'

but when I remove: include < gdcmGlobal.h>, compiles!



来源:https://stackoverflow.com/questions/19738421/qt-gdcm-problems-with-the-libs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!