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. ...
随机推荐
- Java实现"命令式"简易文本编辑器原型
源自早先想法, 打算从界面方向做些尝试. 找到个简单文本编辑器的实现: Simple Text Editor - Java Tutorials. 原本的菜单/按钮界面如下. 包括基本功能: 新建/打开 ...
- 可以让你神操作的手机APP推荐 个个都是爆款系列
手机在我们的生活中显得日益重要,根据手机依赖度调查显示,69%的人出门时必带手机,20%的人经常在吃饭睡觉.上卫生间时使用手机:43%的人早上起床第一件事就是查看手机,不用多说,我们对于手机的依赖性越 ...
- Android View的重绘过程之WindowManager的addView方法
博客首页:http://www.cnblogs.com/kezhuang/p/ 关于Activity的contentView的构建过程,我在我的博客中已经分析过了,不了解的可以去看一下 <[An ...
- Python笔记-高级特性
1.迭代 如果给定一个list或tuple,我们可以通过for循环来遍历这个list或tuple,这种遍历我们称为迭代(Iteration). 如果要迭代value,可以用for value in d ...
- axis根据wsdl生成java客户端代码
根据wsdl生成java客户端代码有多个方法,其中使用axis生成的代码比较友好,也是经常用的一种方法.首先下载axis jar包:axis-bin-1_4.zip 官方地址:http://ws.Ap ...
- linux下mysql配置文件位置
在/usr/share/mysql/ 中找到my.cnf的配置文件,拷贝其中的my-huge.cnf 到 /etc/ 并命名为my.cnf
- (办公)mybatis工作中常见的问题(不定时更新)
1.mybatis的like查询的方式. <if test="shopName != null and shopName != ''"> <bind name=& ...
- MacBook Pro 安装win7 64 成功安装过程总结
安装对象: MacBook Pro (13 英寸, 2010 年中) 中安装win7 64位操作系统(原版安装非Ghost),且只保留win7系统即可. 场景还原: 拿到笔记本时,笔记本中已无Mac ...
- redis报错:java.net.SocketException: Broken pipe (Write failed); nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write failed)
最近写了一个服务通过springboot构建,里面使用了redis作为缓存,发布到服务器运行成功,但是有时候会报redis的错误:org.springframework.data.redis.Redi ...
- linux使用Nginx搭建静态资源服务器
最近公司需要做一个宣传片播放 视频有点大 好几百M 就想到使用Nginx来代理静态资源,在过程中出现了一些问题,比如端口没开.访问是403等,没有成功,后面慢慢查找问题,才发现大部分博客资料的都不全 ...