dcmtk



  • dcmtk with mingw compiler
    Hi,
    I have compiled dcmtk using mingw compiler, created .a files and
    and added libraries, but it shows the error {TARGET}.exe is does not exist

    see the configuration below

    QT += core
    QT -= gui

    CONFIG += c++11

    TARGET = IMRIDicom
    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app

    SOURCES += main.cpp

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/DCMTK/lib/ -ldcmdata
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/DCMTK/lib/ -ldcmdatad

    INCLUDEPATH += $$PWD/DCMTK/include
    DEPENDPATH += $$PWD/DCMTK/include

    win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/libdcmdata.a
    else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/libdcmdatad.a
    else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/dcmdata.lib
    else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/dcmdatad.lib

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/DCMTK/lib/ -lcharls
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/DCMTK/lib/ -lcharlsd

    INCLUDEPATH += $$PWD/DCMTK/include
    DEPENDPATH += $$PWD/DCMTK/include

    win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/libcharls.a
    else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/libcharlsd.a
    else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/charls.lib
    else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/DCMTK/lib/charlsd.lib

    etc....


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What does the build log say ?



  • @SGaist Thank you boss, I solved the issue by replacing the add library statement with
    win32: LIBS += -L$$PWD/DCMTK/lib/ -lcharls

    INCLUDEPATH += $$PWD/DCMTK/include
    DEPENDPATH += $$PWD/DCMTK/include

    win32:!win32-g++: PRE_TARGETDEPS += $$PWD/DCMTK/lib/charls.lib
    else:win32-g++: PRE_TARGETDEPS += $$PWD/DCMTK/lib/libcharls.a etc....

    and downloaded the libws2_32.a,
    libnetapi32.a
    libwsock32.a files and included it in the lib folder and linked in the .pro file

    Thank you @SGaist,


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.