无法链接到vtk 6.3/usr/bin/ld:找不到-lvtkCommon
cannot link to vtk 6.3 /usr/bin/ld: cannot find -lvtkCommon
我从源代码安装了vtk 6.3,我正试图使用以下cmake:编译我的项目
cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
project (paintsquad)
find_package (Qt5 REQUIRED COMPONENTS Widgets Core)
find_package (VTK 6.3 REQUIRED)
find_package (PCL 1.8.0 REQUIRED)
include_directories (/usr/local/lib)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR})
include_directories (${PCL_INCLUDE_DIRS})
link_directories (${PCL_LIBRARY_DIRS})
add_definitions (${PCL_DEFINITIONS})
...
QT5_WRAP_CPP (project_HEADERS_MOC ${project_HEADERS})
QT5_WRAP_UI (project_FORMS_HEADERS ${project_FORMS})
ADD_DEFINITIONS (${QT_DEFINITIONS})
ADD_EXECUTABLE (pcl_visualizer ${project_SOURCES}
${project_FORMS_HEADERS}
${project_HEADERS_MOC}
${project_hpp_files})
TARGET_LINK_LIBRARIES (pcl_visualizer ${PCL_LIBRARIES})
qt5_use_modules (pcl_visualizer Widgets)
但我收到了这些链接器错误:
/usr/bin/ld: cannot find -lvtkCommon
/usr/bin/ld: cannot find -lvtkFiltering
/usr/bin/ld: cannot find -lvtkImaging
/usr/bin/ld: cannot find -lvtkGraphics
/usr/bin/ld: cannot find -lvtkGenericFiltering
/usr/bin/ld: cannot find -lvtkIO
/usr/bin/ld: cannot find -lvtkRendering
/usr/bin/ld: cannot find -lvtkVolumeRendering
/usr/bin/ld: cannot find -lvtkHybrid
/usr/bin/ld: cannot find -lvtkWidgets
/usr/bin/ld: cannot find -lvtkInfovis
/usr/bin/ld: cannot find -lvtkGeovis
/usr/bin/ld: cannot find -lvtkViews
/usr/bin/ld: cannot find -lvtkCharts
collect2: error: ld returned 1 exit status
我以前从源代码安装了vtk 5.8,所以现在我必须安装。我正在使用ubuntu 16。
问题是我以前用vtk 5.8版编译过pcl,并试图使用后来安装的vtk 6.3版。
因此,我首先删除了我的vtk 5.8,然后用vtk 6.3版本重新编译pcl,从而解决了这个问题。
相关文章:
- /usr/bin/ld: cannot find -lc++
- Linux ld 如何解释 -lSomething::AnotherSomething(如 /usr/bin/ld: 找
- 将 swig2.0 添加到 usr/bin/ 以运行 CMake
- Qt5 [make -snap] 无法正确编译:进程"/usr/bin/snap"代码 1 退出
- /usr/bin/ld: build-debug/obj/gpsitem.o: 文件无法识别: 文件被截断
- /usr/bin/ld: cannot find -lGQt
- /usr/bin/ld:找不到本地 libmpifort.so
- /usr/bin/ld: cannot find -lcaffe
- 从源代码安装 gcc: bash: gcc -v /usr/bin/gcc: 是一个目录
- 带有定制 GLFW 二进制 /usr/bin/ld 的 Centos 7: /usr/local/lib/libglfw3.a(init.c.o):".text"部分中无法识别的重定位 (0x2a)
- /usr/bin/ld: /tmp/cc9zxSDP.o: 对符号的未定义引用
- /usr/bin/ld: crtbegin.o: 没有这样的文件: 没有这样的文件或目录
- g++ 编译错误消息:/usr/bin/ld:找不到 -LSSL
- 在 Ubuntu 16.04 的 usr/local/bin 中安装的 c++ 应用程序在从主目录执行时无法正常运行
- /usr/bin/ld:在CentOS 7中找不到-lclapack
- /usr/bin/ld:在 Redhat 上找不到 /usr/lib64/libasan.so.0.0.0
- /usr/bin/ld:无法打开输出文件 bin/genericMatching:没有这样的文件或目录
- /usr/bin/ld:在运行gmock程序时无法在ubuntu上找到-lgmock
- /usr/bin/ld找不到标头:未识别的文件格式
- 如何在 C++ 中修复"/usr/bin/ld: warning: liblber-2.4.so.2, needed by //usr/lib/x86_64-linux-gnu/libcurl-gnu