[vtkusers] VTK5.0 compilation problem with QT4 using Visual C++ 2005

Wang, Haobing Haobing_Wang at meei.harvard.edu
Thu Jul 20 13:19:09 EDT 2006


I found that there was some problem in one of my CMakeList.txt files.
After that was fixed, the compilation was successful both in Release and
Debug mode. Thanks anyway.

 

Haobing

 

________________________________

From: Michael Rice [mailto:marice at knology.net] 
Sent: Wednesday, July 19, 2006 9:40 PM
To: Wang, Haobing 
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] VTK5.0 compilation problem with QT4 using Visual
C++ 2005

 

It looks like it's not linking in the [correct] output from the Qt moc.

 

When you ran 'cmake', did you select a Debug or Release build? If you
selected Release in 'cmake', try setting the configuration to Release in
VS 2005 and then rebuild.

 

Michael

 

On Jul 19, 2006, at 2:56 PM, Wang, Haobing wrote:





Hello,

 

I am trying to compile VTK5.0 with QT4.1.4 using Visual C++ 2005. When
compiling QVTK, I got the following errors:

 

2>------ Build started: Project: QVTK, Configuration: Debug Win32 ------

2>Linking...

2>   Creating library D:\vtk\VTK\bin\Debug\QVTK.lib and object
D:\vtk\VTK\bin\Debug\QVTK.exp

2>vtkEventQtSlotConnect.obj : error LNK2001: unresolved external symbol
"public: virtual struct QMetaObject const * __thiscall
vtkQtConnection::metaObject(void)const "
(?metaObject at vtkQtConnection@@UBEPBUQMetaObject@@XZ)

2>vtkEventQtSlotConnect.obj : error LNK2001: unresolved external symbol
"public: virtual void * __thiscall vtkQtConnection::qt_metacast(char
const *)" (?qt_metacast at vtkQtConnection@@UAEPAXPBD at Z)

2>vtkEventQtSlotConnect.obj : error LNK2001: unresolved external symbol
"public: virtual int __thiscall vtkQtConnection::qt_metacall(enum
QMetaObject::Call,int,void * *)"
(?qt_metacall at vtkQtConnection@@UAEHW4Call at QMetaObject@@HPAPAX at Z)

2>vtkEventQtSlotConnect.obj : error LNK2019: unresolved external symbol
"protected: void __thiscall vtkQtConnection::EmitExecute(class vtkObject
*,unsigned long,void *,void *,class vtkCommand *)"
(?EmitExecute at vtkQtConnection@@IAEXPAVvtkObject@@KPAX1PAVvtkCommand@@@Z)
referenced in function "public: void __thiscall
vtkQtConnection::Execute(class vtkObject *,unsigned long,void *)"
(?Execute at vtkQtConnection@@QAEXPAVvtkObject@@KPAX at Z)

2>D:\vtk\VTK\bin\Debug\QVTK.dll : fatal error LNK1120: 4 unresolved
externals

2>Build log was saved at "file://d <file:///\\d>
:\vtk\VTK\GUISupport\Qt\QVTK.dir\Debug\BuildLog.htm"

2>QVTK - 5 error(s), 0 warning(s)

========== Build: 1 succeeded, 1 failed, 20 up-to-date, 0 skipped
==========

 

I tried to link all the libraries in VTK and QT, but still got those
errors. Does anyone know what the problem is and how to solve it? Thanks
a lot in advance.

 

Haobing

 

_______________________________________________

This is the private VTK discussion list. 

Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:

http://www.vtk.org/mailman/listinfo/vtkusers

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060720/58a76a33/attachment.htm>


More information about the vtkusers mailing list