linux下编译visp库
#下载源码
git clone "https://github.com/lagadic/visp.git"
#work目录
mkdir work
#build目录
mkdir build
#cmake配置
cd work
ccmake ../visp # 关闭动态库,设置为debug模式, output目录为上面的build目录
cmake ../visp
cd ../visp
make -j
#写了一个简单的test.so, 用于python上测试
g++ -o test.o -c test.cpp -I"/data/ahfuzhang/visp/build/include" -std=c++11 -fPIC
#链接
g++ -shared -o libtest.so test.o /data/ahfuzhang/visp/build/lib64/*.a
python中执行报错:
Cannot find reference 'xxx' in libtest.so
#执行ldd检查链接情况:
ldd -r libtest.so
ldd -r libtest1.so
linux-vdso.so.1 => (0x00007ffe5e1f7000)
/$LIB/libonion.so => /lib64/libonion.so (0x00007fae7bf1a000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fae7b846000)
libm.so.6 => /lib64/libm.so.6 (0x00007fae7b544000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fae7b32e000)
libc.so.6 => /lib64/libc.so.6 (0x00007fae7af6c000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fae7ad68000)
/lib64/ld-linux-x86-64.so.2 (0x00007fae7be03000)
undefined symbol: _ZN9vpDisplay20setDownScalingFactorEj (./libtest1.so)
undefined symbol: _ZN9vpDisplay20setDownScalingFactorENS_11vpScaleTypeE (./libtest1.so)
undefined symbol: _ZTI9vpDisplay (./libtest1.so)
undefined symbol: _ZTVN2cv11_InputArrayE (./libtest1.so)
undefined symbol: _ZTVN2cv12_OutputArrayE (./libtest1.so)
undefined symbol: XDrawString (./libtest1.so)
undefined symbol: XLoadFont (./libtest1.so)
undefined symbol: _ZN2cv3Mat10deallocateEv (./libtest1.so)
undefined symbol: XMoveWindow (./libtest1.so)
undefined symbol: _ZN16vpRotationMatrixC1ERK14vpThetaUVector (./libtest1.so)
undefined symbol: _ZN19vpHomogeneousMatrix6insertERK19vpTranslationVector (./libtest1.so)
undefined symbol: cvPutText (./libtest1.so)
undefined symbol: XClearWindow (./libtest1.so)
undefined symbol: cvRectangle (./libtest1.so)
undefined symbol: cvGetTextSize (./libtest1.so)
undefined symbol: XStoreName (./libtest1.so)
undefined symbol: XLookupString (./libtest1.so)
undefined symbol: _ZN13vpImageFilter15getGradXGauss2DERK7vpImageIhERS0_IdEPKdS7_j (./libtest1.so)
undefined symbol: XCreateImage (./libtest1.so)
undefined symbol: _ZNK18vpCameraParameters13get_K_inverseEv (./libtest1.so)
undefined symbol: _ZN2cv8Subdiv2D6insertENS_6Point_IfEE (./libtest1.so)
undefined symbol: _ZN7vpPlaneaSERKS_ (./libtest1.so)
undefined symbol: XSetFont (./libtest1.so)
undefined symbol: _ZN13vpImageFilter6filterERK7vpImageIhERS0_IdEPKdj (./libtest1.so)
undefined symbol: _ZN6vpTime4waitEd (./libtest1.so)
undefined symbol: _ZN9vpDisplayD2Ev (./libtest1.so)
undefined symbol: cvCircle (./libtest1.so)
undefined symbol: cvSetMouseCallback (./libtest1.so)
undefined symbol: XCreateSimpleWindow (./libtest1.so)
undefined symbol: XCreateColormap (./libtest1.so)
undefined symbol: dgesdd_ (./libtest1.so)
undefined symbol: XOpenDisplay (./libtest1.so)
undefined symbol: _ZNK2cv3Mat3invEi (./libtest1.so)
undefined symbol: XDrawPoint (./libtest1.so)
undefined symbol: XImageByteOrder (./libtest1.so)
undefined symbol: XCopyArea (./libtest1.so)
undefined symbol: XDrawLine (./libtest1.so)
undefined symbol: XDestroyWindow (./libtest1.so)
undefined symbol: cvReleaseImage (./libtest1.so)
undefined symbol: XCloseDisplay (./libtest1.so)
undefined symbol: XFillArc (./libtest1.so)
undefined symbol: _ZN2cv13projectPointsERKNS_11_InputArrayES2_S2_S2_S2_RKNS_12_OutputArrayES5_d (./libtest1.so)
undefined symbol: XSetForeground (./libtest1.so)
undefined symbol: XFillRectangle (./libtest1.so)
undefined symbol: _ZN13vpImageFilter17getGaussianKernelEPdjdb (./libtest1.so)
undefined symbol: _ZN8vpRobustC1Ej (./libtest1.so)
undefined symbol: XFreeGC (./libtest1.so)
undefined symbol: _ZN7vpPlaneC1Ev (./libtest1.so)
undefined symbol: cvNamedWindow (./libtest1.so)
undefined symbol: XDisplayName (./libtest1.so)
undefined symbol: XDrawRectangle (./libtest1.so)
undefined symbol: _ZN19vpHomogeneousMatrix9buildFromEdddddd (./libtest1.so)
undefined symbol: XBitmapPad (./libtest1.so)
undefined symbol: XSetLineAttributes (./libtest1.so)
undefined symbol: XClearArea (./libtest1.so)
undefined symbol: _ZNK2cv8Subdiv2D15getTriangleListERSt6vectorINS_3VecIfLi6EEESaIS3_EE (./libtest1.so)
undefined symbol: _ZN13vpImageFilter27getGaussianDerivativeKernelEPdjdb (./libtest1.so)
undefined symbol: cvMoveWindow (./libtest1.so)
undefined symbol: XCheckMaskEvent (./libtest1.so)
undefined symbol: dgetrf_ (./libtest1.so)
undefined symbol: XMapWindow (./libtest1.so)
undefined symbol: cvDestroyWindow (./libtest1.so)
undefined symbol: cvLine (./libtest1.so)
undefined symbol: _ZN2cv3Mat8copySizeERKS0_ (./libtest1.so)
undefined symbol: cvCreateImage (./libtest1.so)
undefined symbol: _ZN2cv11determinantERKNS_11_InputArrayE (./libtest1.so)
undefined symbol: cvWaitKey (./libtest1.so)
undefined symbol: XSetWindowBackground (./libtest1.so)
undefined symbol: XCreateGC (./libtest1.so)
undefined symbol: XSelectInput (./libtest1.so)
undefined symbol: _ZNK7vpPlane9getNormalER11vpColVector (./libtest1.so)
undefined symbol: XFlush (./libtest1.so)
undefined symbol: _ZN2cv3Mat3eyeEiii (./libtest1.so)
undefined symbol: _ZN13vpImageFilter17getGaussPyramidalERK7vpImageIhERS1_ (./libtest1.so)
undefined symbol: XSync (./libtest1.so)
undefined symbol: XMaskEvent (./libtest1.so)
undefined symbol: _ZN2cv8Subdiv2DC1ENS_5Rect_IiEE (./libtest1.so)
undefined symbol: _ZN2cv3SVDclERKNS_11_InputArrayEi (./libtest1.so)
undefined symbol: XPutImage (./libtest1.so)
undefined symbol: _ZN2cv11_InputArrayC1ERKNS_7MatExprE (./libtest1.so)
undefined symbol: _ZN8vpRobust10MEstimatorENS_21vpRobustEstimatorTypeERK11vpColVectorRS1_ (./libtest1.so)
undefined symbol: _ZN2cv11_InputArrayC1ERKNS_3MatE (./libtest1.so)
undefined symbol: _ZN19vpHomogeneousMatrix6insertERK16vpRotationMatrix (./libtest1.so)
undefined symbol: cvShowImage (./libtest1.so)
undefined symbol: XInstallColormap (./libtest1.so)
undefined symbol: _ZN2cv7noArrayEv (./libtest1.so)
undefined symbol: XGetImage (./libtest1.so)
undefined symbol: XDrawArc (./libtest1.so)
undefined symbol: XSetWindowBackgroundPixmap (./libtest1.so)
undefined symbol: XAllocColor (./libtest1.so)
undefined symbol: XQueryPointer (./libtest1.so)
undefined symbol: _ZN9vpDisplayC2Ev (./libtest1.so)
undefined symbol: XSetStandardProperties (./libtest1.so)
undefined symbol: _ZN19vpHomogeneousMatrixC1Ev (./libtest1.so)
undefined symbol: XFreePixmap (./libtest1.so)
undefined symbol: _ZN13vpImageFilter15getGradYGauss2DERK7vpImageIhERS0_IdEPKdS7_j (./libtest1.so)
undefined symbol: _ZN19vpHomogeneousMatrixaSERKS_ (./libtest1.so)
undefined symbol: cvInitFont (./libtest1.so)
undefined symbol: _ZN2cv8fastFreeEPv (./libtest1.so)
undefined symbol: XCreatePixmap (./libtest1.so)
undefined symbol: _ZN2cv3Mat5zerosEiii (./libtest1.so)
undefined symbol: XStoreColor (./libtest1.so)
undefined symbol: _ZN14vpImageConvert7convertEPK9_IplImageR7vpImageI6vpRGBaEb (./libtest1.so)
undefined symbol: _ZN6vpRGBaaSERKS_ (./libtest1.so)
undefined symbol: XSetWindowColormap (./libtest1.so)
undefined symbol: _ZNK18vpCameraParameters5get_KEv (./libtest1.so)
undefined symbol: dgetri_ (./libtest1.so)
undefined symbol: _ZN9vpDisplay8setScaleENS_11vpScaleTypeEjj (./libtest1.so)
#最后逐个搜索库,然后用下面的参数解决:
g++ -shared -o libtest.so test.o -L"/data/ahfuzhang/visp/build/lib64" /data/ahfuzhang/visp/build/lib64/*.a -lstdc++ -lX11 -lopencv_core -lopencv_imgproc -lopencv_highgui -lvisp_core -lvisp_gui -lopencv_calib3d -L/usr/lib64/ "/usr/lib64/liblapack.so.3.4.2"
linux下编译visp库的更多相关文章
- Linux下编译boost库和qt和ImageMagick
需要把整个PCIE的工程移植到Linux下,当初就是用cmake来管理的工程的.但是命令行之类的还是需要改动.改动还不少,cmake里面很多东西都依赖于windows.包括我用cmake重新管理的工程 ...
- Linux下编译第三方库的问题
因为各个Linux发行版之间的差异还是挺大的,有一些预安装在系统上的基本库是不一样的(不仅仅是版本,有一些是有和无的区别). 那么问题来了: 编译第三方库./configure的时候一般我们不会定制那 ...
- Linux下 编译lib3ds库
从网上下载的一个QT程序链接需要用到lib3ds.a静态库. lib3ds is an overall software library for managing 3D-Studio Release ...
- linux下编译Boost库
下载源码 boost_1_66_0.tar.gz 生成编译工具 # tar axf boost_1_66_0.tar.gz # cd boost_1_66_0 # yum install gcc gc ...
- linux下编译 静态库、动态库,动态库依赖静态库
xx.o : xx.h xx.cpp -lstdc++ -o xx.o -c xx.cpp -I ./ libxx.a : xx.o ar -crv libxx.a xx.o libTest.so : ...
- linux下编译lua库
编辑MakeFile INSTALL_TOP= /usr/local修改为目标install位置 执行 make linux make install 如果提示依赖libreadline 可以直接a ...
- linux下编译静态库openssl
先编译zlib cmake . -DCMAKE_INSTALL_PREFIX=/depends make make install 然后编译openssl ./config zlib no-rc5 n ...
- linux下编译qt5.6.0静态库——configure配置
linux下编译qt5.6.0静态库 linux下编译qt5.6.0静态库 configure生成makefile 安装选项 Configure选项 第三方库: 附加选项: QNX/Blackberr ...
- linux下编译安装boost库
linux下编译安装boost库 linux下编译安装boost库 1.下载并解压boost 1.58 源代码 下载 解压 2.运行bootstrap.sh 3.使用b2进行构建 构建成功的提示 4. ...
随机推荐
- Unable to execute 'doFinal' with cipher instance [javax.crypto.Cipher@4e025e0a]
org.apache.shiro.crypto.CryptoException: Unable to execute 'doFinal' with cipher instance [javax.cry ...
- python之循环(增删)内使用list.remove()
dat=['] for item in dat: ': dat.remove(item) print(dat) #按要求是把'0'都删掉的,输出结果是['1', '2', '3', '0'] ?? 首 ...
- 第三次上机,ADO接口的使用
<html> <head> <title>Reg</title> </head> <body><center> &l ...
- SpringBoot 集成Apache Kafak 消息队列
Kafka is a distributed,partitioned,replicated commit logservice.它提供了类似于JMS的特性,但是在实现上完全不同,此外它并不是JMS规范 ...
- python带参函数(计算器脚本解释标注)
环境 python 3.* def operator(op1,op2,opfu): #定义符号函数,op1表示第一个运算数值,op2表示第二个,opfu表示运算符号 if opfu not in '+ ...
- SQL Server中将多行数据拼接为一行数据(一个字符串)
表A中id与表B中aid为一对多的关系 例如: 表A: id name a1 tom a2 lily a3 lucy 表B: id aid value b1 a1 B1 b2 a1 B2 b3 a2 ...
- 对const的总结与思考
今天偶然想起const这一关键字,再加之以前几种const修饰指针方式让我印象深刻(混淆不清),重新回顾了一下,自己对这个关键词也又有了更加深刻的理解,所以总结一下. 一.const的定义 const ...
- 【转】HTTP请求中的form data和request payload的区别
jQuery的ajax方法和post方法分别发送请求,在后台Servlet进行处理时结果是不一样的,比如用$.ajax方法发送请求时(data参数是一个JSON.stringify()处理后的字符串, ...
- selenium跳过webdriver检测并模拟登录淘宝
目录 简介 编写思路 使用教程 演示图片 源代码 @(文章目录) 简介 模拟登录淘宝已经不是一件新鲜的事情了,过去我曾经使用get/post方式进行爬虫,同时也加入IP代理池进行跳过检验,但随着大型网 ...
- 三十九、vue中element最原始的分页(未封装的)
html<el-table ref="scoreUserTable" :data="scorePageUser.slice((currentPage1-1)*pag ...