Hi,
I want to use dcmtk library in a Qt application. The library is built by Visual Studio 2008. Now I want to use it in QT. After I configure the includepath and libs and build the application, it is said that some header, e.g. "iostream.h" is not found. Maybe the correct header is "iostream", not "iostream.h". How can I set up Qt to pass the building?
I doubt this is related to the compiler. My QT build setting is as follows:
"
qmake.exe D:/DICOM_Viewer/imageviewer.pro -r -spec win32-g++
"
Do I need to configure to use a different compiler? e.g. msvc2008
Thanks!
How to compile and link dcmtk in Qt
Moderator: Moderator Team
How to compile and link dcmtk in Qt
Last edited by fruan on Fri, 2010-08-06, 15:44, edited 1 time in total.
Hi fruan,
if you want to use libs in your application, you have to compile it first.
Then, you can link your project with dcmk libs (dcmdata, dcmnet...) with includepath correctly set to dcmtk headers path.
You have to use the same compiler for libs and for your project (if you use msvc, you will obtain .lib, usable in msvc for link)
Hope this will help you
if you want to use libs in your application, you have to compile it first.
Then, you can link your project with dcmk libs (dcmdata, dcmnet...) with includepath correctly set to dcmtk headers path.
You have to use the same compiler for libs and for your project (if you use msvc, you will obtain .lib, usable in msvc for link)
Hope this will help you
Thanks so much!
So the correct step is:
1. build library in Visual Studio 2008.
2. Setup compiler to VS 2008 in Qt project
3. Setup path for include and lib files
4. Build in Qt
Right?
If I want to run my application in Linux, I need to use linux compiler, e.g. g++ to build the library and then setup g++ compiler in Qt. Then Qt can pass its building, right?
So the correct step is:
1. build library in Visual Studio 2008.
2. Setup compiler to VS 2008 in Qt project
3. Setup path for include and lib files
4. Build in Qt
Right?
If I want to run my application in Linux, I need to use linux compiler, e.g. g++ to build the library and then setup g++ compiler in Qt. Then Qt can pass its building, right?
-
- Posts: 85
- Joined: Sun, 2010-12-26, 17:34
could you give me more details in how to build for qt and use it , forgive me but I am a newbie to qt and dcmtkfruan wrote:Thanks so much!
So the correct step is:
1. build library in Visual Studio 2008.
2. Setup compiler to VS 2008 in Qt project
3. Setup path for include and lib files
4. Build in Qt
Right?
If I want to run my application in Linux, I need to use linux compiler, e.g. g++ to build the library and then setup g++ compiler in Qt. Then Qt can pass its building, right?
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest