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.
Dcmtk with QtCreator
Moderator: Moderator Team
-
- Posts: 56
- Joined: Mon, 2010-06-14, 16:41
Re: Dcmtk with QtCreator
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:
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
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
Hope this will help you to start writing a dcmtk based program.
Frank
Re: Dcmtk with QtCreator
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
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!
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
}
#----------------------------------------------------------
with built-in libpng, libtiff, libxml, zlib, and OpenSSL libraries.
Download!
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest