[vtkusers] QVTKWidget error

Massinissa Bandou Massinissa.Bandou at USherbrooke.ca
Wed Apr 17 14:20:04 EDT 2013


Hi,
I've tried with CMake. I got some errors when I build the solution
(debug/release) it seems not recognizing the Qt libraries. I just want to
know what wrong with my cmakelist?

2>ClCompile:
2>  main.cpp
2>c:\users\massi\desktop\imageregistration\imageregistration\imageregistration.h(4):
fatal error C1083: Cannot open include file: 'QtGui/QMainWindow': No such
file or directory
2>  imageregistration.cpp
2>c:\users\massi\desktop\imageregistration\imageregistration\imageregistration.h(4):
fatal error C1083: Cannot open include file: 'QtGui/QMainWindow': No such
file or directory
2>  myVtkInteractorStyleImage.cpp
2>c:\users\massi\desktop\imageregistration\imageregistration\imageregistration.h(4):
fatal error C1083: Cannot open include file: 'QtGui/QMainWindow': No such
file or directory
2>  settings.cpp
2>c:\users\massi\desktop\imageregistration\imageregistration\settings.h(3):
fatal error C1083: Cannot open include file: 'ui_SettingsGUI.h': No such
file or directory
2>  DataProcess.cpp
2>c:\users\massi\desktop\imageregistration\imageregistration\dataProcess.h(3):
fatal error C1083: Cannot open include file: 'ui_DataProcessGUI.h': No such
file or directory
2>  moc_imageregistration.cxx
2>c:\users\massi\desktop\myproject\../ImageRegistration/ImageRegistration/imageregistration.h(4):
fatal error C1083: Cannot open include file: 'QtGui/QMainWindow': No such
file or directory
2>  moc_dataProcess.cxx
2>c:\users\massi\desktop\myproject\ui_DataProcessGUI.h(13): fatal error
C1083: Cannot open include file: 'QtCore/QVariant': No such file or
directory
2>  moc_settings.cxx
2>c:\users\massi\desktop\myproject\ui_SettingsGUI.h(13): fatal error C1083:
Cannot open include file: 'QtCore/QVariant': No such file or directory
2>  qrc_imageregistration.cxx
2>C:\Users\Massi\Desktop\MyProject\qrc_imageregistration.cxx(10): fatal
error C1083: Cannot open include file: 'QtCore/qglobal.h': No such file or
directory
2>  Generating Code...
2>
2>Build FAILED.

 
Here is my CMakeList.txt with my .cpp .h .ui and .qrc.

cmake_minimum_required(VERSION 2.8)

PROJECT(ImageRegistration)

FIND_PACKAGE(ITK  REQUIRED) 
INCLUDE(${ITK_USE_FILE}) 

FIND_PACKAGE(VTK REQUIRED) 
INCLUDE(${VTK_USE_FILE})

FIND_PACKAGE(Qt4)
INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR})

SET(MYPROJECT_SRCS
main.cpp
imageregistration.cpp
myVtkInteractorStyleImage.cpp
settings.cpp
DataProcess.cpp

dataProcess.h
imageregistration.h
myVtkInteractorStyleImage.h
settings.h

DataProcessGUI.ui
HelpGUI.ui
MainGUI.ui
OptionGUI.ui
SettingsGUI.ui
)

SET(MYPROJECT_MOC_HDRS imageregistration.h dataProcess.h settings.h
myVtkInteractorStyleImage.h)
SET(MYPROJECT_UIS MainGUI.ui DataProcessGUI.ui HelpGUI.ui SettingsGUI.ui
OptionGUI.ui)
SET(MYPROJECT_RCS imageregistration.qrc)

QT4_ADD_RESOURCES(MYPROJECT_RC_SRCS ${MYPROJECT_RCS} )
QT4_WRAP_UI(MYPROJECT_UI_HDRS ${MYPROJECT_UIS} )
QT4_WRAP_CPP(MYPROJECT_MOC_SRCS ${MYPROJECT_MOC_HDRS} )
  
ADD_EXECUTABLE(ImageRegistration ${MYPROJECT_SRCS} ${MYPROJECT_MOC_HDRS}
${MYPROJECT_MOC_SRCS} ${MYPROJECT_RC_SRCS} ${MYPROJECT_UI_HDRS})

TARGET_LINK_LIBRARIES(ImageRegistration ${QT_LIBRARIES})
TARGET_LINK_LIBRARIES(ImageRegistration ${ITK_LIBRARIES})
TARGET_LINK_LIBRARIES(ImageRegistration ${VTK_LIBRARIES} QVTK)



thank you for your help!

Massi



--
View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-error-tp5719992p5720142.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list