我正在尝试使用VTK_WRAP_TCL = ON和VTK_USE_TK = ON来构建VTK但是有以下链接器错误:
> Compiling... vtkTkAppInit.cxx Compiling resources... Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 Copyright (C) Microsoft Corporation. All rights reserved. Compiling manifest to resources... Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 Copyright (C) Microsoft Corporation. All rights reserved. Linking... Creating library D:\VTK\bin\bin\Debug\vtk.lib and object D:\VTK\bin\bin\Debug\vtk.exp vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tk_MainEx referenced in function _main vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_CreateInterp referenced in function _main vtkCommonTCL.lib(vtkTclUtil.obj) : error LNK2001: unresolved external symbol __imp__Tcl_CreateInterp vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_SetVar referenced in function _Tcl_AppInit vtkCommonTCL.lib(vtkTclUtil.obj) : error LNK2001: unresolved external symbol __imp__Tcl_SetVar vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_Eval referenced in function _Tcl_AppInit vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tk_Init referenced in function _Tcl_AppInit vtkTkAppInit.obj : error LNK2019: unresolved external symbol __imp__Tcl_Init referenced in function _Tcl_AppInit vtkCommonTCL.lib(vtkTclUtil.obj) : error LNK2019: unresolved external symbol __imp__Tcl_GetAssocData referenced in function "struct vtkTclInterpStruct * __cdecl vtkGetInterpStruct(struct Tcl_Interp *)" (?vtkGetInterpStruct@@YAPAUvtkTclInterpStruct@@PAUTcl_Interp@@@Z) vtkFilteringTCL.lib(vtkSourceTcl.obj) : error LNK2019: unresolved external symbol __imp__Tcl_DeleteCommand referenced in function "int __cdecl vtkSourceCppCommand(class vtkSource *,struct Tcl_Interp *,int,char * * const)" (?vtkSourceCppCommand@@YAHPAVvtkSource@@PAUTcl_Interp@@HQAPAD@Z) vtkRenderingTCL.lib(vtkAbstractVolumeMapperTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkRenderingTCL.lib(vtkImporterTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkWidgetsTCL.lib(vtkContinuousValueWidgetRepresentationTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkFilteringTCL.lib(vtkProcessObjectTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkFilteringTCL.lib(vtkMapper2DTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkFilteringTCL.lib(vtkViewportTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkFilteringTCL.lib(vtkAbstractMapperTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkFilteringTCL.lib(vtkThreadedImageAlgorithmTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkFilteringTCL.lib(vtkImageInPlaceFilterTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand vtkFilteringTCL.lib(vtkRectilinearGridSourceTcl.obj) : error LNK2001: unresolved external symbol __imp__Tcl_DeleteCommand . . D:\VTK\bin\bin\Debug\vtk.exe : fatal error LNK1120: 65 unresolved externals Results Build log was saved at "file://d:\VTK\bin\Wrapping\Tcl\vtk.dir\Debug\BuildLog.htm" vtk - 22432 error(s), 0 warning(s)
请帮忙解决。 感谢。
答案 0 :(得分:0)
我安装了Tclx64版本,并尝试使用32位编译器构建它。 通过安装x86版本并使用Debug | Win32编译它来解决问题。
http://public.kitware.com/pipermail/vtkusers/2011-September/118696.html这篇文章帮助我理解了这个问题。