使用CMake为vtk编译解决方案文件时出现的问题

时间:2015-08-11 02:00:24

标签: c++ visual-studio-2010 qt cmake vtk

就像我说的那样,我尝试使用CMake(2.8.12)和QT(4.7.4)编译VTK(版本5.10.1)

按照使用visual studio cmd line安装QT的说明后,我打开vtk的源代码,运行CMAKE,并尝试使用Visual Studio Pro编译解决方案文件。

有一些图书馆没有编译,但我希望有人能解释如何修复,我可以尝试自己修复其他图书馆。

构建QVTKWidgetPlugin时,我不断收到以下错误代码:

1>------ Build started: Project: ZERO_CHECK, Configuration: Release Win32 ------
1>Build started 8/10/2015 9:57:50 PM.
1>InitializeBuildStatus:
1>  Creating "Win32\Release\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>FinalizeBuildStatus:
1>  Deleting file "Win32\Release\ZERO_CHECK\ZERO_CHECK.unsuccessfulbuild".
1>  Touching "Win32\Release\ZERO_CHECK\ZERO_CHECK.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:00.10
2>------ Build started: Project: QVTKWidgetPlugin, Configuration: Release Win32 ------
2>Build started 8/10/2015 9:57:51 PM.
2>InitializeBuildStatus:
2>  Touching "QVTKWidgetPlugin.dir\Release\QVTKWidgetPlugin.unsuccessfulbuild".
2>CustomBuild:
2>  All outputs are up-to-date.
2>ClCompile:
2>  All outputs are up-to-date.
2>Link:
2>     Creating library C:/vtk/bin/bin/Release/QVTKWidgetPlugin.lib and object C:/vtk/bin/bin/Release/QVTKWidgetPlugin.exp
2>Q4VTKWidgetPlugin.obj : error LNK2019: unresolved external symbol "private: static struct QString::Data QString::shared_null" (?shared_null@QString@@0UData@1@A) referenced in function "public: __thiscall QString::QString(void)" (??0QString@@QAE@XZ)
2>Q4VTKWidgetPlugin.obj : error LNK2019: unresolved external symbol "public: static struct QListData::Data QListData::shared_null" (?shared_null@QListData@@2UData@1@A) referenced in function "public: __thiscall QList<class QDesignerCustomWidgetInterface *>::QList<class QDesignerCustomWidgetInterface *>(void)" (??0?$QList@PAVQDesignerCustomWidgetInterface@@@@QAE@XZ)
2>moc_Q4VTKWidgetPlugin.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWidget::staticMetaObject" (?staticMetaObject@QWidget@@2UQMetaObject@@B)
2>moc_Q4VTKWidgetPlugin.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QObject::staticMetaObject" (?staticMetaObject@QObject@@2UQMetaObject@@B)
2>C:\vtk\bin\bin\Release\QVTKWidgetPlugin.dll : fatal error LNK1120: 4 unresolved externals
2>
2>Build FAILED.
2>
2>Time Elapsed 00:00:00.14
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我知道它基本上是在寻找没有定义的东西,但我不确定如何修复它。据我所知,这应该100%来自QT-> VTK,但我有一些问题。提前谢谢!

0 个答案:

没有答案