/usr/bin/ld: cannot find -lvtkCommon

在Ubuntu系统中遇到编译错误/usr/bin/ld: cannot find -l...,涉及vtk库系列问题。解决方法是通过sudo apt-get install安装对应的libvtk库和开发包。
摘要由CSDN通过智能技术生成

/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 -lvtkParallel
/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,即可

sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev 

vtk7.0-qt5.7的 32位开发包,由cmake生成vs2015项目文件后编译出来,包含 bin, cmake, include, lib, plugins, share 6个子目录 (前面一个是错的,把opengl当opengl2了,这个才是正确的opengl2) 顺便提一下,qt pro文件中这样引入vtk: INCLUDEPATH += $$PWD C:/vtk/VTK-7.0/x86-release/include/vtk-7.0 LIBS += -LC:/vtk/VTK-7.0/x86-release/lib/ \ -lvtkalglib-7.0 \ -lvtkChartsCore-7.0 \ -lvtkCommonColor-7.0 \ -lvtkCommonComputationalGeometry-7.0 \ -lvtkCommonCore-7.0 \ -lvtkCommonDataModel-7.0 \ -lvtkCommonExecutionModel-7.0 \ -lvtkCommonMath-7.0 \ -lvtkCommonMisc-7.0 \ -lvtkCommonSystem-7.0 \ -lvtkCommonTransforms-7.0 \ -lvtkDICOMParser-7.0 \ -lvtkDomainsChemistry-7.0 \ -lvtkDomainsChemistryOpenGL2-7.0 \ -lvtkexoIIc-7.0 \ -lvtkexpat-7.0 \ -lvtkFiltersAMR-7.0 \ -lvtkFiltersCore-7.0 \ -lvtkFiltersExtraction-7.0 \ -lvtkFiltersFlowPaths-7.0 \ -lvtkFiltersGeneral-7.0 \ -lvtkFiltersGeneric-7.0 \ -lvtkFiltersGeometry-7.0 \ -lvtkFiltersHybrid-7.0 \ -lvtkFiltersHyperTree-7.0 \ -lvtkFiltersImaging-7.0 \ -lvtkFiltersModeling-7.0 \ -lvtkFiltersParallel-7.0 \ -lvtkFiltersParallelImaging-7.0 \ -lvtkFiltersProgrammable-7.0 \ -lvtkFiltersSelection-7.0 \ -lvtkFiltersSMP-7.0 \ -lvtkFiltersSources-7.0 \ -lvtkFiltersStatistics-7.0 \ -lvtkFiltersTexture-7.0 \ -lvtkFiltersVerdict-7.0 \ -lvtkfreetype-7.0 \ -lvtkGeovisCore-7.0 \ -lvtkglew-7.0 \ -lvtkGUISupportQt-7.0 \ -lvtkGUISupportQtSQL-7.0 \ -lvtkhdf5_hl-7.0 \ -lvtkhdf5-7.0 \ -lvtkImagingColor-7.0 \ -lvtkImagingCore-7.0 \ -lvtkImagingFourier-7.0 \ -lvtkImagingGeneral-7.0 \ -lvtkImagingHybrid-7.0 \ -lvtkImagingMath-7.0 \ -lvtkImagingMorphological-7.0 \ -lvtkImagingSources-7.0 \ -lvtkImagingStatistics-7.0 \ -lvtkImagingStencil-7.0 \ -lvtkInfovisCore-7.0 \ -lvtkInfovisLayout-7.0 \ -lvtkInteractionImage-7.0 \ -lvtkInteractionStyle-7.0 \ -lvtkInteractionWidgets-7.0 \ -lvtkIOAMR-7.0 \ -lvtkIOCore-7.0 \ -lvtkIOEnSight-7.0 \ -lvtkIOExodus-7.0 \ -lvtkIOExport-7.0 \ -lvtkIOGeometry-7.0 \ -lvtkIOImage-7.0 \ -lvtkIOImport-7.0 \ -lvtkIOInfovis-7.0 \ -lvtkIOLegacy-7.0 \ -lvtkIOLSDyna-7.0 \ -lvtkIOMINC-7.0 \ -lvtkIOMovie-7.0 \ -lvtkIONetCDF-7.0 \ -lvtkIOParallel-7.0 \ -lvtkIOParallelXML-7.0 \ -lvtkIOPLY-7.0 \ -lvtkIOSQL-7.0 \ -lvtkIOVideo-7.0 \ -lvtkIOXML-7.0 \ -lvtkIOXMLParser-7.0 \ -lvtkjpeg-7.0 \ -lvtkjsoncpp-7.0 \ -lvtklibxml2-7.0 \ -lvtkmetaio-7.0 \ -lvtkNetCDF_cxx-7.0 \ -lvtkNetCDF-7.0 \ -lvtkoggtheora-7.0 \ -lvtkParallelCore-7.0 \ -lvtkpng-7.0 \ -lvtkproj4-7.0 \ -lvtkRenderingAnnotation-7.0 \ -lvtkRenderingContext2D-7.0 \ -lvtkRenderingContextOpenGL2-7.0 \ -lvtkRenderingCore-7.0 \ -lvtkRenderingFreeType-7.0 \ -lvtkRenderingImage-7.0 \ -lvtkRenderingLabel-7.0 \ -lvtkRenderingLOD-7.0 \ -lvtkRenderingOpenGL2-7.0 \ -lvtkRenderingQt-7.0 \ -lvtkRenderingVolume-7.0 \ -lvtkRenderingVolumeOpenGL2-7.0 \ -lvtksqlite-7.0 \ -lvtksys-7.0 \ -lvtkTestingGenericBridge-7.0 \ -lvtkTestingIOSQL-7.0 \ -lvtkTestingRendering-7.0 \ -lvtktiff-7.0 \ -lvtkverdict-7.0 \ -lvtkViewsContext2D-7.0 \ -lvtkViewsCore-7.0 \ -lvtkViewsInfovis-7.0 \ -lvtkViewsQt-7.0 \ -lvtkzlib-7.0 CONFIG += c++11 QT += core gui charts printsupport
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

JoannaJuanCV

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值