LNK1181:无法打开输入文件'D:\ programs \ gdcm-2.6.2 \ qt-build \ bin.obj'

时间:2016-03-07 20:02:16

标签: visual-studio-2013 qt5.5 gdcm

我在MS-VS 2013中使用cmake后跟ALL_BUILD选项构建了gdcm 2.6.2的调试和发布配置。当我尝试链接在Qt 5.5.1项目中创建的库时,我收到错误:< / p>

LINK : fatal error LNK1181: cannot open input file 'D:\programs\gdcm-2.6.2\qt-build\bin.obj'

控制台日志的详细信息如下:

  19:47:14: The process "C:\Qt\Qt5.5.1\Tools\QtCreator\bin\jom.exe" exited normally.
19:47:14: Running steps for project dcm_browser...
19:47:14: Configuration unchanged, skipping qmake step.
19:47:14: Starting: "C:\Qt\Qt5.5.1\Tools\QtCreator\bin\jom.exe" 
    C:\Qt\Qt5.5.1\Tools\QtCreator\bin\jom.exe -f Makefile.Release
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:release\dcm_browser.exe @C:\Users\drusm\AppData\Local\Temp\dcm_browser.exe.13888.16.jom
LINK : fatal error LNK1181: cannot open input file 'D:\programs\gdcm-2.6.2\qt-build\bin.obj'
jom: D:\programs\code\build-dcm_browser-Desktop_Qt_5_5_1_MSVC2013_64bit-Release\Makefile.Release [release\dcm_browser.exe] Error 1181
jom: D:\programs\code\build-dcm_browser-Desktop_Qt_5_5_1_MSVC2013_64bit-Release\Makefile [release] Error 2
19:47:14: The process "C:\Qt\Qt5.5.1\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project dcm_browser (kit: Desktop Qt 5.5.1 MSVC2013 64bit)
When executing step "Make"
19:47:14: Elapsed time: 00:08.

我的.pro文件是这样的:

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = dcm_browser
TEMPLATE = app
unix:{
INCLUDEPATH += /usr/local/include/gdcm-2.6
LIBS +=  -L/home/usman/programs/gdcm-2.6.3/build/bin
}


INCLUDEPATH += "D:\programs\gdcm-2.6.2\Source\DataStructureAndEncodingDefinition" \
    "D:\programs\gdcm-2.6.2\Source\Common" \
    "D:\programs\gdcm-2.6.2\msvc_build\Source\Common" \
  D:\programs\gdcm-2.6.2\Source\MediaStorageAndFileFormat \


LIBS+= "D:\programs\gdcm-2.6.2\qt-build\bin"    


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

SOURCES += main.cpp\
        mainwindow.cpp \
    dcmdump.cpp \
    dcmanonymizer.cpp

HEADERS  += mainwindow.h \
    dcmdump.h \
    dcmanonymizer.h \

FORMS    += mainwindow.ui

我花了一整天的时间,使用MS-VS编译器2013(64位)在Qt creator和MS visual studio中构建gdcm。但没有好处。请帮忙!!!

1 个答案:

答案 0 :(得分:1)

一个小错字,我忘了把-L标志放在库路径中:

{{1}}

所以当我把它修改为

{{1}}

它编译!!!