6

error LNK1104: cannot open file vtkRendering.lib 解决方法

 3 years ago
source link: https://arminli.com/lnk1104/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Armin's Blog

error LNK1104: cannot open file vtkRendering.lib 解决方法

July 26, 2016

在《VTK 图形图像开发进阶》中,第一个程序 Chap01 按照书上编译会出现 1104 的错误,解决方法如下:

CMakeLists.txt

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT( Chap01 )

FIND_PACKAGE( VTK REQUIRED )
INCLUDE( ${VTK_USE_FILE} )

ADD_EXECUTABLE( 1.3_TestVTKInstall 1.3_TestVTKInstall.cpp)
TARGET_LINK_LIBRARIES( 1.3_TestVTKInstall vtkRendering vtkCommon )

最后一行改为:

TARGET_LINK_LIBRARIES( 1.3_TestVTKInstall ${VTK_LIBRARIES} )

然后重新用 Cmake 编译,按照书上步骤运行。


Profile picture

Written by Armin Li , a venture capitalist. [Weibo] [Subscribe]


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK