I have built debug and release configurations of gdcm 2.6.2 using cmake followed by ALL_BUILD option in MS-VS 2013. When i try to link the libraries so created in my Qt 5.5.1 Project, i get the error:
LINK : fatal error LNK1181: cannot open input file 'D:\programs\gdcm-2.6.2\qt-build\bin.obj'
The details of the console log are:
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.
My .pro file is this:
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
I have spent the whole day, building gdcm inside both Qt creator and MS visual studio, using MS-VS compiler 2013 (64-bit) . but no good. Please help !!!
A small typo, I forgot to put the -L flag in library path:
LIBS+= "D:\programs\gdcm-2.6.2\qt-build\bin"
So when i amended it to
LIBS+= -L"D:\programs\gdcm-2.6.2\qt-build\bin"
it compiled!!!