[Insight-users] Help with linking to the Qt libraries and VNL solver

mitch519 mitchell at robots.ox.ac.uk
Sat Apr 30 19:36:28 EDT 2011


There are currently two problems I m having with my code (based on ITK, VTK
and Qt):

First Cmake yields a solution, including all required packages (ITK, VTK and
Qt); though showing (in Cmake)

QT3_QGLOBAL_H_FILE-NOTFOUND
QT4_QGLOBAL_H_FILE-NOTFOUND

Therefore when I try to compile my project solution in Visual studio, it
simply gives an error "C:\MyProjects\VTKCVS\GUISupport\Qt\QVTKWidget.h(39) :
fatal error C1083: Cannot open include file: 'qwidget.h': No such file or
directory".

The second question is related to using the VNL solver:

I have included all VNL solver libraries setting up my ITK. Though now also
during project compilation, it gives me errors like 
"
randomWalkSeg.cpp(465) : error C2065: 'vsl_b_ofstream' : undeclared
identifier
1>..\randomWalkSeg.cpp(465) : error C2146: syntax error : missing ';' before
identifier '_Lustream'
1>..\randomWalkSeg.cpp(465) : error C3861: '_Lustream': identifier not found
1>..\randomWalkSeg.cpp(472) : error C3861: 'vsl_b_write': identifier not
found
1>..\randomWalkSeg.cpp(473) : error C2065: 'bfs' : undeclared identifier
1>..\randomWalkSeg.cpp(473) : error C2228: left of '.close' must have
class/struct/union
1>        type is ''unknown-type''
1>..\randomWalkSeg.cpp(476) : error C2146: syntax error : missing ';' before
identifier '_rhsstream'
1>..\randomWalkSeg.cpp(476) : error C3861: '_rhsstream': identifier not
found
1>..\randomWalkSeg.cpp(483) : error C3861: 'vsl_b_write': identifier not
found
1>..\randomWalkSeg.cpp(484) : error C2228: left of '.close' must have
class/struct/union
"

I m also attaching my CMakelist in case if that is where the problems lay.
Thanks a million for your kind assistance. Any help would be much
appreciated! 

PROJECT (VolSeg)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR
          "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

FIND_PACKAGE(QT4 REQUIRED)

SET(SOURCE
  VolSeg.cpp
  stdafx.cpp
spdEqSolver.cpp
randomWalkSeg.cpp
cVolume.cpp
cVolOp.cpp
pview.cpp	 	   	
)

SET(HEADERS
  stdafx.h
spdEqSolver.h
randomWalkSeg.h
cVolume.h
cVolOp.h
pview.h
)


ADD_EXECUTABLE(VolSeg ${SOURCE} ${HEADERS})

# ADD_EXECUTABLE(VolSeg VolSeg.cpp)
TARGET_LINK_LIBRARIES(VolSeg vtkIO
						   vtkImaging
						   vtkFiltering
						   vtkCommon						  						 
						   ITKCommon
						   ITKAlgorithms
						   ITKBasicFilters
						   ITKNumerics
						   ITKIO)
-- 
View this message in context: http://old.nabble.com/Help-with-linking-to-the-Qt-libraries-and-VNL-solver-tp31513083p31513083.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list