[Cmake] VTK+QT and Cmalists

Oliveira Marcelo marceloitk at yahoo.com.br
Thu Jul 29 16:03:32 EDT 2004


Hi Users !!!

I got the VTKQT from
http://www.matthias-koenig.net/vtkqt/

version( vtk4qt3.tgz ). I'm using CMAKE 2.0.2, VTK4.4
and QT 3.3.2 on Debian 3.0. 

I untar the vtk4qt3.tgz and edit Makefile - everthing
works ok, so i have libvtk.a. 

IS MY CMAKELISTS RIGHT ??? 

TANKS A LOT FOR YOUR HELP !!!!!

I wrote my CMakalists like that:

PROJECT(teste)

# 
# Find ITK
#
INCLUDE (${CMAKE_ROOT}/Modules/FindITK.cmake)
IF (USE_ITK_FILE)
  INCLUDE(${USE_ITK_FILE})
ENDIF(USE_ITK_FILE)

# 
# Find VTK
#
INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)
IF (USE_VTK_FILE)
  INCLUDE(${USE_VTK_FILE})
ENDIF(USE_VTK_FILE)


# 
# Find QT
#
INCLUDE (${CMAKE_ROOT}/Modules/FindQt.cmake)

INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIR}
${QT_INCLUDE_PATH}
${teste_BINARY_DIR} 
${teste_SOURCE_DIR}
/home/marcelo/vtkqt/
)

LINK_LIBRARIES (


vtkCommon 
vtkRendering 
vtkIO 
vtkImaging 
vtkPatented 
vtkHybrid 
ITKNumerics 
ITKCommon
ITKBasicFilters 
ITKIO 
ITKAlgorithms 

vtkqt

${QT_QT_LIBRARY}
${QT_GL_LIBRARY}
)

IF(WIN32)
ADD_DEFINITIONS(-DQT_DLL) 
ENDIF(WIN32)

SET(teste_SRCS
main.cpp
.ui/form1.cpp
)

SET(teste_MOC_SRCS 
.ui/form1.h
)

SET(teste_GUI_SRCS 
form1.ui 
)

IF(QT_WRAP_UI)
QT_WRAP_UI(testeExecutable 
teste_HDRS 
teste_SRCS 
teste_GUI_SRCS 
) 
ENDIF(QT_WRAP_UI)

QT_WRAP_CPP(testeExecutable 
teste_SRCS 
teste_MOC_SRCS)


INCLUDE_DIRECTORIES(/home/marcelo/vtkqt)
LINK_DIRECTORIES(/home/marcelo/vtkqt)

ADD_EXECUTABLE(testeExecutable teste_SRCS)

//*************************************************
//***** AND I RECEIVED THIS ERROR   ***************
//*************************************************

make 
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x149):
In function
`vtkQtRenderWindow::vtkQtRenderWindow[not-in-charge](QGLFormat
const&, QWidget*, char const*, QGLWidget const*,
unsigned)':
/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to
`QGLWidget::QGLWidget[not-in-charge](QGLFormat const&,
QWidget*, char const*, QGLWidget const*, unsigned)'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x1b5):
In function
`vtkQtRenderWindow::vtkQtRenderWindow[not-in-charge](QGLFormat
const&, QWidget*, char const*, QGLWidget const*,
unsigned)':
/home/marcelo/VTK/Rendering/vtkRenderWindow.h:342:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x1ff):
In function
`vtkQtRenderWindow::vtkQtRenderWindow[in-charge](QGLFormat
const&, QWidget*, char const*, QGLWidget const*,
unsigned)':
/home/marcelo/VTK/Rendering/vtkRenderWindow.h:350:
undefined reference to
`QGLWidget::QGLWidget[not-in-charge](QGLFormat const&,
QWidget*, char const*, QGLWidget const*, unsigned)'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x26b):
In function
`vtkQtRenderWindow::vtkQtRenderWindow[in-charge](QGLFormat
const&, QWidget*, char const*, QGLWidget const*,
unsigned)':
/home/marcelo/VTK/Common/vtkWindow.h:133: undefined
reference to `QGLWidget::~QGLWidget [not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x2ae):
In function
`vtkQtRenderWindow::vtkQtRenderWindow[not-in-charge](QWidget*,
char const*, QGLWidget const*, unsigned)':
/home/marcelo/VTK/Common/vtkWindow.h:132: undefined
reference to
`QGLWidget::QGLWidget[not-in-charge](QWidget*, char
const*, QGLWidget const*, unsigned)'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x31a):
In function
`vtkQtRenderWindow::vtkQtRenderWindow[not-in-charge](QWidget*,
char const*, QGLWidget const*, unsigned)':
/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:71:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x35c):
In function
`vtkQtRenderWindow::vtkQtRenderWindow[in-charge](QWidget*,
char const*, QGLWidget const*, unsigned)':
/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:70:
undefined reference to
`QGLWidget::QGLWidget[not-in-charge](QWidget*, char
const*, QGLWidget const*, unsigned)'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x3c8):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:71:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x6d3):
In function `vtkQtRenderWindow::~vtkQtRenderWindow
[not-in-charge]()':
/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:104:
undefined reference to `QGLWidget::makeCurrent()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x79b):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:118:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x7b4):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:118:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x807):
In function `vtkQtRenderWindow::~vtkQtRenderWindow
[in-charge]()':
/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:104:
undefined reference to `QGLWidget::makeCurrent()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x8cf):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:118:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x8e8):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:118:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0x93b):
In function `vtkQtRenderWindow::~vtkQtRenderWindow
[in-charge deleting]()':
/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:104:
undefined reference to `QGLWidget::makeCurrent()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0xa03):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:118:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.text+0xa1c):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:118:
undefined reference to `QGLWidget::~QGLWidget
[not-in-charge]()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0xc):/usr/local/src/qt3/include/qsizepolicy.h:73:
undefined reference to `QGLWidget::className() const'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x10):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:52:
undefined reference to `QGLWidget::qt_cast(char
const*)'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1d4):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to
`QGLWidget::grabFrameBuffer(bool)'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1d8):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to
`QGLWidget::makeOverlayCurrent()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1dc):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to `QGLWidget::updateGL()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1e0):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to `QGLWidget::updateOverlayGL()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1f0):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to
`QGLWidget::initializeOverlayGL()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1f4):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to
`QGLWidget::resizeOverlayGL(int, int)'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1f8):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to `QGLWidget::paintOverlayGL()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x1fc):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:65:
undefined reference to `QGLWidget::glInit()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTV17vtkQtRenderWindow+0x200):/home/marcelo/VTK/Rendering/vtkRenderWindow.h:350:
undefined reference to `QGLWidget::glDraw()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.t._ZNK9QGLWidget10metaObjectEv+0x7):
In function `QGLWidget::metaObject() const':
/home/marcelo/VTK/Common/vtkWindow.h:64: undefined
reference to `QGLWidget::staticMetaObject()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.t._ZN17vtkQtRenderWindow11MakeCurrentEv+0xd):
In function `vtkQtRenderWindow::MakeCurrent()':
/usr/local/src/qt3/include/qsizepolicy.h:73: undefined
reference to `QGLWidget::makeCurrent()'
/home/marcelo/vtkqt/libvtkqt.a(vtkQtRenderWindow.o)(.gnu.linkonce.r._ZTI17vtkQtRenderWindow+0x10):/home/marcelo/vtkqt/vtkQtRenderWindow.cpp:52:
undefined reference to `typeinfo for QGLWidget'
collect2: ld returned 1 exit status
make[1]: *** [/home/marcelo/teste/bin/testeExecutable]
Error 1
make: *** [default_target] Error 2


//****************************************************





	
	
		
_______________________________________________________
Yahoo! Mail agora com 100MB, anti-spam e antivírus grátis!
http://br.info.mail.yahoo.com/


More information about the Cmake mailing list