intergrating qt4 ,vtk and visual studio2010

删除回忆录丶 提交于 2019-12-10 12:15:38

问题


I have an integrated visual studio (2010) and Qt(4 visual studio addin) combination and just recently decided to add VTK5.I have managed to compile VTK as per the numerous instructions everywhere .However i tried to build a simple example from the VTK website but i get the Dll errors below.I have added include paths in visual studio but just can't compile .please direct me on what i should do next .

GeneratedFiles\Debug\moc_QVTKWidget.cpp(73): warning C4273: 'staticMetaObjectExtraData' : inconsistent dll linkage E:/libs/vtk/vtk-5.10.1/VTK5.10.1/GUISupport/Qt/QVTKWidget.h(76) : see previous definition of 'private: static QMetaObjectExtraData const QVTKWidget::staticMetaObjectExtraData' GeneratedFiles\Debug\moc_QVTKWidget.cpp(77): error C2491: 'QVTKWidget::staticMetaObject' : definition of dllimport static data member not allowed


回答1:


I have been able to build a working environment following this guide, it is really helpful and well explained (and, as the more important thing, it uses VS2010, QT 4 and VTK 5): http://guitarcplusplus.blogspot.it/2013/02/itk-vtk-qt-on-window-7-64bit-and-visual.html.



来源:https://stackoverflow.com/questions/17884532/intergrating-qt4-vtk-and-visual-studio2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!