[Insight-users] using ITk with Qt- cannot find 'vnl/vnl_vector.h'

Ashish Singh mrasingh at gmail.com
Tue Jan 16 13:27:40 EST 2007


Thanks Luis. I got it to work, btw. My cmakelists.txt file looks like this:
----
PROJECT(myimg)

# Find ITK.
FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)

FIND_PACKAGE(QT)
IF(QT_FOUND)
    INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
ENDIF(QT_FOUND)

INCLUDE(${QT_USE_FILE})

ADD_EXECUTABLE(myimg myclass.cpp myclass.h mymain.cpp)

TARGET_LINK_LIBRARIES(myimg ITKCommon ITKIO ${QT_LIBRARIES})
---------
Please let me know if I need to add anything else here. Previously I didn't
include the line
INCLUDE(${QT_USE_FILE})
and it was not working.

Thanks,
Ashish

On 1/15/07, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>
> Hi Ashish,
>
> Please post to the list the CMakeLists.txt file that you
> used for integrating ITK and Qt in your applications.
>
> You may find useful to look at the example in
>
>
>        InsightApplications/QtITK
>
>
> Regrads,
>
>
>     Luis
>
>
> ---------------------
> Ashish Singh wrote:
> > Hi,
> >
> > I am trying to integrate my simple ITK application with Qt. I am using
> > qmake, but having problems writing the ',pro' file. After I provide the
> > paths to include files and libraries and run qmake from the command
> > prompt, I get the '.vcproj' file. When I try to build this project from
> > inside the visual studio, it is not able to find the header file-
> > 'vnl/vnl_vector.h' and gives me the following error.
> >
> > c:\myinstalls\itk\insighttoolkit-3.0.0\code\io\itkImageIOBase.h(24) :
> > fatal error C1083: Cannot open include file: 'vnl/vnl_vector.h': No such
> > file or directory
> >
> > I have included the path to 'vnl_vector.h' in my qmake '.pro' file. I am
> > not able to figure out why is it not able to find the path. I tried Qt
> > with ITk, using Cmake, but there my visual studio project cannot find
> > the file ' qapplication.h', although I have the right paths and
> > libraries in place. Can anyone please tell me where am I going wrong?
> > Or else guide me to use ITK with Qt, either using qmake or cmake.
> >
> > Thanks,
> > Ashish
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070116/7d413813/attachment.html


More information about the Insight-users mailing list