[ITK Community] [Insight-users] Hello ITK with Qt Creator issue

Mike Chinander chinander at gmail.com
Wed Feb 26 09:01:23 EST 2014


The easiest way is to use a CMakeLists.txt project file instead of QT's
.pro project file. QtCreator has support for using a CMakeLists.txt file
instead of a .pro file:

http://qt-project.org/doc/qt-5.0/qtdoc/cmake-manual.html


On Wed, Feb 26, 2014 at 7:04 AM, Barbara Post <bpo at eonix.be> wrote:

> Hello,
>
> I have to use Qt Creator as an IDE, and integrate ITK into the project I
> work on.
>
> I use MSVC 2010 64 bit compiler. I compiled ITK with this compiler,
> without glitches. I installed ITK in C:\ITK.
>
> However QMake doesn't want at all to find itkImage.h.
>
> I'm surprised, since I checked what follows many times.
>
> Here are the files of plain C++ project with Qt Creator, thank you for
> helping.
>
> Qt Creator project file (.pro):
>
> TEMPLATE = app
> CONFIG += console
> CONFIG -= app_bundle
> CONFIG -= qt
>
> # ITK base directory
> ITK = $(ITK)
>
> # ITK headers base directory
> ITK_INCLUDES = $${ITK}/include/ITK4-5
>
> # ITK libs base directory
> ITK_LIBS = $${ITK}/lib
>
> # Pass information to Qmake (include path)
> INCLUDEPATH += \
> # $${ITK_INCLUDES}
> C:/ITK/include/ITK4-5
>
> # Pass information to Qmake (lib path)
> QMAKE_LIBDIR += \
> #    $${ITK_LIBS}
> C:/ITK/lib
>
> SOURCES += main.cpp
>
> main.cpp:
>
> #include "itkImage.h"
> #include <iostream>
> int main()
> {
> typedef itk::Image< unsigned short, 3 > ImageType;
> ImageType::Pointer image = ImageType::New();
> std::cout << "ITK Hello World !" << std::endl;
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140226/2af2637f/attachment-0002.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list