Re: [Insight-users] Error in program Qt + itk package

Tomáš Kazmar Tomash.Kazmar at seznam.cz
Wed Feb 27 15:46:12 EST 2008


Hi Walter,

  I would try QT_QT_INCLUDE_DIR instead. Qt header files are usually
split up into several subirectories. For each subdirectory a variable
QT_subdir_INCLUDE_DIR is setup correctly. QApplication should be
in path point to by QT_QT_INCLUDE_DIR.

Regards,
Tomas

# It is likely that the variable QT_INCLUDE_DIR isn't correctly specified.
# Post the values from your CMakeCache.txt and also verify the include paths
# yourself to make sure that qapplication.h is indeed present in the include
# path using "make VERBOSE=1" on gcc or from the properties panel in
# VisualStudio
# 
# On 2/27/08, Walter Cabrera wrote:
# >
# >
# > I am doing a test with the following source (Qt + itk):
# >
# > #include <qapplication.h>
# >
# > int main(int argc, char *argv[])
# > {
# >   QApplication app( argc, argv );
# >   return app.exec();
# > }
# >
# > give  error becouse not found qapplication.h
# >
# > CMakeLists.txt used
# >
# > PROJECT(QtITK)
# >
# > # Find ITK.
# > FIND_PACKAGE(ITK REQUIRED)
# > IF(ITK_FOUND)
# >   INCLUDE(${ITK_USE_FILE})
# > ELSE (ITK_FOUND)
# >   MESSAGE(FATAL_ERROR "ITK not found. Please set ITK_DIR.")
# > ENDIF(ITK_FOUND)
# >
# > # Find Qt.
# > FIND_PACKAGE(QT)
# > IF(QT_FOUND)
# >   INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})
# > ELSE (QT_FOUND)
# >   MESSAGE(FATAL_ERROR "QT not found. Please set QT_DIR.")
# > ENDIF(QT_FOUND)
# >
# > ADD_EXECUTABLE(QtITK QtITK.cxx)
# >
# > Someone can help me?
# >
# > Thanks


More information about the Insight-users mailing list