Dcmtk with QtCreator

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
faisal_tum
Posts: 33
Joined: Fri, 2013-01-11, 15:37

Dcmtk with QtCreator

#1 Post by faisal_tum »

Hi, I'm new to Dcmtk and I'm not greatly experience in C++. I want to use Dcmtk libraries with QtCreator. Is that possible? If so, could you please give me in an instruction of how I can add Dcmtk to QtCreator?

Thank you.

Roadrunner
Posts: 56
Joined: Mon, 2010-06-14, 16:41

Re: Dcmtk with QtCreator

#2 Post by Roadrunner »

I'm using different paths for dcmtk debug and release version and if you want to use
different os like linux and windows you ave to add win32: for windows and
linux: or unix for 'the other one'... in front of the words
INCLUDEPATH => win32:INCLUDEPATH
and the same for LIBS

Please remember the libs -lws2_32 -lnetapi32 -lwsock32 don't exist under linux so you
need an extra line for this libs which starts with win32:LIBS ...

Add the following lines to the .pro file:

Code: Select all

CONFIG(debug,debug|release):{
#debug {
    INCLUDEPATH +=  E:/dev/dcmtk-3.6.1_20121102-VC_2010-debug/include 

    # M$-libs
    #LIBS += -L"C:/Programme/Microsoft SDKs/Windows/v6.0A/Lib"
    LIBS += -L"C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib"

    # DCMTk
    LIBS += -L"E:/dev/dcmtk-3.6.1_20121102-VC_2010-debug/lib"
}



CONFIG(release, debug|release):{
    INCLUDEPATH +=  E:/dev/dcmtk-3.6.1_20121102-VC_2010-release/include 

    #LIBS
    # DCMTK
    LIBS += -L"E:/dev/dcmtk-3.6.1_20121102-VC_2010-release/lib"
}


# DCMTK
LIBS += -lofstd -ldcmimgle  -ldcmimage  -ldcmnet -lAdvapi32 -ldcmdata -loflog  -lws2_32 -lnetapi32 -lwsock32
LIBS += -ldcmjpeg -lijg16 -lijg12 -lijg8 -ldcmpstat

BTW: Could anybody move this thread in the correct part of this forum? DCMPRINT is really wrong. ;-)

Hope this will help you to start writing a dcmtk based program.

Frank

gele
Posts: 2
Joined: Fri, 2015-01-16, 12:27
Location: Macedonia
Contact:

Re: Dcmtk with QtCreator

#3 Post by gele »

Here is my pro file just copy this into your Qt Creator pro file download the pre-compiled lib and you are ready to start

Code: Select all

#-------- DCMTK Library-------------------------------------
INCLUDEPATH += "../external/dcmtk/include"
CONFIG(debug, debug|release){
    LIBS += -L"../external/dcmtk/lib/win32/Debug" \
    -ladvapi32 \
    -lzlib_d \
    -ldcmdata \
    -lijg16 \
    -lijg8 \
    -lijg12 \
    -ldcmimgle \
    -ldcmimage \
    -ldcmjpeg \
    -loflog \
    -lofstd \
    -lws2_32 \
    -lnetapi32 \
    -lwsock32
}else{
    LIBS += -L"../external/dcmtk/lib/win32/Release" \
    -ladvapi32 \
    -lzlib_o \
    -ldcmdata \
    -lijg16 \
    -lijg8 \
    -lijg12 \
    -ldcmimgle \
    -ldcmimage \
    -ldcmjpeg \
    -loflog \
    -lofstd \
    -lws2_32 \
    -lnetapi32 \
    -lwsock32
}
#----------------------------------------------------------
Pre-compiled DCMTK 3.6.0 debug and release libraries for MS Visual Studio 2010
with built-in libpng, libtiff, libxml, zlib, and OpenSSL libraries.
Download!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest