Qt + GDCM与libs有关

时间:2013-11-02 02:42:38

标签: qt gdcm

我正在尝试在我的项目中使用库gdcm。但是我遇到了一些问题。

gdcmGlobal.cxx:-1:错误:对gdcm::System::FileIsDirectory(char const*)' gdcmGlobal.cxx:-1: error: undefined reference to gdcm :: System :: FileIsDirectory(char const *)'的未定义引用 gdcmGlobal.cxx:-1:错误:对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]'

我包含了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

有人会知道发生了什么吗? 谢谢!

1 个答案:

答案 0 :(得分:1)

Qt 5.1使用g ++ 4.8,我使用g ++ 4.6编译gdcm!那就是问题所在!但是,当我包括:

  

包括< gdcmGlobal.h>

出现此错误:

  

gdcmGlobal.cxx:-1:错误:未定义引用   `gdcm :: System :: FileIsDirectory(char const *)'

但是当我删除时:include< gdcmGlobal.h>,编译!