VTK6 error: no override found for
2016-06-16 17:35
375 查看
转自:http://blog.csdn.net/imsaws/article/details/15500903
If you build your project with CMake, and you use the standard find_package(VTK) and include(${VTK_USE_FILE}) then this problem should not occur. (Because the defines will be automatically added for you by virtue of the include(${VTK_USE_FILE})...)
The factory methods now require "auto-initialization" depending on what modules are enabled at VTK configure time. If you are enabling all modules, and building your project without using CMake, you will need some defines in your project in order to make the
factories work properly.
On September 10, 2013 a new macro was added to make this process a little simpler for projects that just want to initialize modules, where ordering ceases to be important but you must still build a source file into your application that has something along
with following (with one entry for each module that should be initialized).
This will initialize the vtkRenderingOpenGL object factories, and should be done for each module. If you are using an older version of VTK (6.0 or master from before the date above) than you can try including this snippet in all your code that includes VTK
usage, BEFORE including ANY VTK header files:
See these references (and follow the mailing list threads to their conclusions) for more info:
http://www.vtk.org/pipermail/vtkusers/2013-April/128255.html
https://github.com/Kitware/VTK/commit/9385718b82e6af83b7e7dcc90a937419edc6892b
http://www.vtk.org/pipermail/vtkusers/2013-March/127811.html
I have also had the NULL pointer; surely the code should not compile and just dump a NULL pointer as a result of a call to
However after setting the above options (in Windows VStudio 2008 v9 "Property Pages->Preprocessor definitions" for the program I am linking) I get a message from my compiler that some (20) functions were not found. The user at ref [1] seems
to have hundreds of missing links.
"2>vtkSDIView.obj : error LNK2001: unresolved external symbol "void __cdecl vtkInteractionStyle_AutoInit_Construct(void)" (?vtkInteractionStyle_AutoInit_Construct@@YAXXZ) 2>vtkSDI.cpp.obj : error LNK2001: unresolved external symbol "void __cdecl vtkInteractionStyle_AutoInit_Destruct(void)"(?vtkInteractionStyle_AutoInit_Destruct@@YAXXZ)"
After linking all the libraries found in the example code (eg the Cone example) these link errors go away. This required adding several tens of new libraries that I had not needed to link for version 5.8 which is slightly annoying. The preprocessor definitions
I mention above can also be copied from the Cone example.
If you build your project with CMake, and you use the standard find_package(VTK) and include(${VTK_USE_FILE}) then this problem should not occur. (Because the defines will be automatically added for you by virtue of the include(${VTK_USE_FILE})...)
The factory methods now require "auto-initialization" depending on what modules are enabled at VTK configure time. If you are enabling all modules, and building your project without using CMake, you will need some defines in your project in order to make the
factories work properly.
On September 10, 2013 a new macro was added to make this process a little simpler for projects that just want to initialize modules, where ordering ceases to be important but you must still build a source file into your application that has something along
with following (with one entry for each module that should be initialized).
#include <vtkAutoInit.h> VTK_MODULE_INIT(vtkRenderingOpenGL);
This will initialize the vtkRenderingOpenGL object factories, and should be done for each module. If you are using an older version of VTK (6.0 or master from before the date above) than you can try including this snippet in all your code that includes VTK
usage, BEFORE including ANY VTK header files:
#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL) #define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)
See these references (and follow the mailing list threads to their conclusions) for more info:
http://www.vtk.org/pipermail/vtkusers/2013-April/128255.html
https://github.com/Kitware/VTK/commit/9385718b82e6af83b7e7dcc90a937419edc6892b
http://www.vtk.org/pipermail/vtkusers/2013-March/127811.html
I have also had the NULL pointer; surely the code should not compile and just dump a NULL pointer as a result of a call to
theMapper = vtkPolyDataMapper::New();
However after setting the above options (in Windows VStudio 2008 v9 "Property Pages->Preprocessor definitions" for the program I am linking) I get a message from my compiler that some (20) functions were not found. The user at ref [1] seems
to have hundreds of missing links.
"2>vtkSDIView.obj : error LNK2001: unresolved external symbol "void __cdecl vtkInteractionStyle_AutoInit_Construct(void)" (?vtkInteractionStyle_AutoInit_Construct@@YAXXZ) 2>vtkSDI.cpp.obj : error LNK2001: unresolved external symbol "void __cdecl vtkInteractionStyle_AutoInit_Destruct(void)"(?vtkInteractionStyle_AutoInit_Destruct@@YAXXZ)"
After linking all the libraries found in the example code (eg the Cone example) these link errors go away. This required adding several tens of new libraries that I had not needed to link for version 5.8 which is slightly annoying. The preprocessor definitions
I mention above can also be copied from the Cone example.
相关文章推荐
- 策略模式认知
- iOS 布尔值转换中文 以及布尔值的打印
- 冒泡
- C# 多线程是否结束可通过线程池可以判断
- 华为C语言编程规范—排版
- 16进制
- 登陆界面
- 如何把PDF文件内容转换成TXT
- SQL注入(PreparedStatement)
- mongo中删除filed不存在的document
- IOS数据库操作SQLite3使用详解
- IPC网络高清摄像机基础知识5(经典YUV格式详解)
- iOS应用性能调优建议
- 选择法排序
- 信息
- 禁止ViewPager滑动
- 使用junit进行单元测试的注解的执行顺序。
- 用keytool创建Keystore和Trustsotre文件
- 【VMCloud云平台】拥抱Docker(五)Volume(2)
- android 中 Drawable 和 ConstantState 的一些认识