使用CMake-GUI 3.2.2安装带有Qt 5.4的VTK 6.2.0 [英] Install VTK 6.2.0 with Qt 5.4 using CMake-GUI 3.2.2

查看:333
本文介绍了使用CMake-GUI 3.2.2安装带有Qt 5.4的VTK 6.2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次尝试使用Vtk库,但我找不到一个教程,可以帮助我的qt集成。我试了几个教程,但当我尝试写一些代码,qt找不到vtk库。
我跟着这个帖子,但有些不正常工作:在窗口上组合Qt 5.4.1和vtk 6.2.0(使用CMake GUI 3.2.1)
可以有人解释我的正确程序?我使用Windows 7 64位,VTK 6.2.0,QT 5.4和CMake GUI 3.2.2。

This is the first time I try to use Vtk libraries but I can not find a tutorial that can help me with the qt integration. I tried several tutorials but when I try to write some code, qt can not find vtk libraries. I followed this post but something doesn't work correctly: Combining Qt 5.4.1 with vtk 6.2.0 (using CMake GUI 3.2.1) on windows Can someone explain me the correct procedure? I'm using Windows 7 64 bit, VTK 6.2.0, QT 5.4 and CMake-GUI 3.2.2. Thanks to all who respond!

推荐答案

您是在调试或发布中构建vtk解决方案吗?在你链接的例子(它是我),我是在调试,所以它只能在调试(直到我建立它在发布)工作

Did you build the vtk solution in debug or release? In the example you linked (it was me), I did it in debug, so it will only work in debug (until I build it in release)

它是你的cMakeList的问题。你是否从vtk解决方案中启动了项目EasyView?

also, maybe it's your cMakeList the problem. Did you manage to launch the project EasyView from the vtk solution?

最后,我遵循的教程是这样: http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup

Finally, the tutorial I followed was this one : http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup

我唯一需要修改的是将qt版本更改为5,添加另一个条目cmake_prefix并设置几个环境变量。

The only thing I had to modify, was to change the qt version to 5, add another entry cmake_prefix and set up several environment variables.

这篇关于使用CMake-GUI 3.2.2安装带有Qt 5.4的VTK 6.2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆