2013-04-20 151 views
0

我很难在Windows 7 64位SP1上的Visual Studio 2010中编译VTK 5.10.1示例代码。Visual Studio 2010使用VTK链接错误

首先,我使用this tutorial安装了VTK。 安装VTK时没有发生错误,位于C:\ VTK5.10.1_cmake \ bin \ Release的示例可执行文件(如cone.exe)运行得很好。

在Visual Studio 2010中,我启动了一个新的Win32控制台应用程序,并测试了this site的第一个示例代码。 我编辑的项目属性(其他包括目录,额外的库目录和其他依赖项)。

的链接错误,看上去像是:

vtktest.obj : error LNK2019: unresolved external symbol ""public: void __thiscall vtkRenderer::AddActor(class vtkProp *)" ([email protected]@@[email protected]@@Z)" referenced in function "_main".

大多数其他人同样的错误,忘记了库添加到附加依赖。 但是我在C:\ VTK5.10.1_bin \ lib \ vtk-5.10目录和opengl32库中添加了所有库。我试图用空格,分号和新行来分离库。

然后,我读到人们正在使用共享库。我对dll并不熟悉。我重新安装VTK 并打开共享库选项,并将生成的dll复制到System32目录。 现在,错误看起来略有不同:

vtktest.obj : error LNK2019: unresolved external symbol ""__declspec(dllimport) public: void __thiscall vtkRenderer::AddActor(class vtkProp *)" ([email protected]@@[email protected]@@Z)" referenced in function "_main".

任何帮助将appriciated!

回答

0

没关系,忘了将平台更改为x64:/