libdecodeqr-0.9.3在ubuntu上移植记录
2014-12-24 14:49
1116 查看
依赖
opencv-2.0.0
解压
#tar -xjvf libdecodeqr-0.9.3.tar.bz2
出现 doc img src 三个目录
#cd src
#./configure
#make
#vi configure
//char cvCreateImage ();
int
main ()
{
//return cvCreateImage ();
;
return 0;
}
#cp /usr/local/include/opencv/* /usr/local/include/
/usr/bin/ld: ../../libdecodeqr/libdecodeqr.a(imagereader.o): undefined reference to symbol 'cvApproxPoly'
/usr/bin/ld: note: 'cvApproxPoly' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libcv.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libcv.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[4]: *** [libdecodeqr-simpletest] Error 1
#cd src/sample/simple
#vi Makefle
CXX=g++
CPPFLAGS=-I/usr/local/include/+set -I/usr/local/include/opencv -g -O2 -c -I$(LI$
LIBCV=-lcv
LIBHIGHGUI=-lhighgui
LIBCXCORE=-lcxcore
LIBCVAUX=-lcvaux
LIBS=-ldecodeqr $(LIBCXCORE) $(LIBCV) $(LIBHIGHGUI)
LDFLAGS= -L$(LIBDECODEQR_DIR) -L/usr/local/lib
Reorder library linking so that -lcv comes after -ldecodeqr which references it.
make[1]: Entering directory `/home/pjq/libdecodeqr-0.9.3-5ubuntu1/src/libdecodeqr'
g++ -g -O2 -fPIC -c imagereader.cpp
In file included from /usr/local/include/ml.h:115:0,
from imagereader.h:22,
from imagereader.cpp:14:
imagereader.cpp: In function ‘void Qr::apaptive_white_leveling(const CvArr*, CvArr*, double, int, int, int, double)’:
imagereader.cpp:1056:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsBadArg,
^
imagereader.cpp:1062:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsBadArg, "Only CV_TRESH_BINARY and CV_THRESH_BINARY_INV "
^
imagereader.cpp:1069:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsUnmatchedFormats, "" );
^
imagereader.cpp:1072:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsUnsupportedFormat, "" );
^
imagereader.cpp:1075:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsUnmatchedSizes, "" );
^
make[1]: *** [imagereader.o] Error 1
make[1]: Leaving directory `/home/pjq/libdecodeqr-0.9.3-5ubuntu1/src/libdecodeqr'
make: *** [libdecodeqr] Error 2
#vi /usr/local/include/cxerror.h
#endif /* _CXCORE_ERROR_H_ */
#define __BEGIN__ {
#define __END__ goto exit; exit: ; }
#define __CLEANUP__
#define EXIT goto exit
#define __CV_BEGIN__ {
#define __CV_END__ goto exit; exit: ; }
#define __CV_EXIT__ goto exit
/* End of file. */
opencv-2.0.0
解压
#tar -xjvf libdecodeqr-0.9.3.tar.bz2
出现 doc img src 三个目录
#cd src
#./configure
#make
错误解决
./configure 然后出现checking for cvCreateImage in -lcv... no 之后配置失败
#cd src#vi configure
//char cvCreateImage ();
int
main ()
{
//return cvCreateImage ();
;
return 0;
}
./configure 然后出现If your system already has OpenCV, append place of the cv.h 之后配置失败
如果你的头文件在 /usr/local/include/opencv/目录下#cp /usr/local/include/opencv/* /usr/local/include/
错误libdecodeqr.a(imagereader.o): undefined reference to symbol 'cvApproxPoly'
g++ -Wl,-Bsymbolic-functions -L../../libdecodeqr -o libdecodeqr-simpletest simpletest.o -lcv -lhighgui -lcxcore -ldecodeqr/usr/bin/ld: ../../libdecodeqr/libdecodeqr.a(imagereader.o): undefined reference to symbol 'cvApproxPoly'
/usr/bin/ld: note: 'cvApproxPoly' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libcv.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libcv.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[4]: *** [libdecodeqr-simpletest] Error 1
#cd src/sample/simple
#vi Makefle
CXX=g++
CPPFLAGS=-I/usr/local/include/+set -I/usr/local/include/opencv -g -O2 -c -I$(LI$
LIBCV=-lcv
LIBHIGHGUI=-lhighgui
LIBCXCORE=-lcxcore
LIBCVAUX=-lcvaux
LIBS=-ldecodeqr $(LIBCXCORE) $(LIBCV) $(LIBHIGHGUI)
LDFLAGS= -L$(LIBDECODEQR_DIR) -L/usr/local/lib
Reorder library linking so that -lcv comes after -ldecodeqr which references it.
__CV_BEGIN__ __CV_EXIT__没有定义
如果装的是opencv-2.1.0将会出现类似的错误。make[1]: Entering directory `/home/pjq/libdecodeqr-0.9.3-5ubuntu1/src/libdecodeqr'
g++ -g -O2 -fPIC -c imagereader.cpp
In file included from /usr/local/include/ml.h:115:0,
from imagereader.h:22,
from imagereader.cpp:14:
imagereader.cpp: In function ‘void Qr::apaptive_white_leveling(const CvArr*, CvArr*, double, int, int, int, double)’:
imagereader.cpp:1056:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsBadArg,
^
imagereader.cpp:1062:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsBadArg, "Only CV_TRESH_BINARY and CV_THRESH_BINARY_INV "
^
imagereader.cpp:1069:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsUnmatchedFormats, "" );
^
imagereader.cpp:1072:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsUnsupportedFormat, "" );
^
imagereader.cpp:1075:13: error: ‘__CV_EXIT__’ was not declared in this scope
CV_ERROR( CV_StsUnmatchedSizes, "" );
^
make[1]: *** [imagereader.o] Error 1
make[1]: Leaving directory `/home/pjq/libdecodeqr-0.9.3-5ubuntu1/src/libdecodeqr'
make: *** [libdecodeqr] Error 2
#vi /usr/local/include/cxerror.h
#endif /* _CXCORE_ERROR_H_ */
#define __BEGIN__ {
#define __END__ goto exit; exit: ; }
#define __CLEANUP__
#define EXIT goto exit
#define __CV_BEGIN__ {
#define __CV_END__ goto exit; exit: ; }
#define __CV_EXIT__ goto exit
/* End of file. */
相关文章推荐
- libdecodeqr_0.9.3.orig 内存泄漏修改
- 全志A33移植ubuntu系统记录(1)V1.0(分色排版)
- JRTPLib 移植到Android - Ubuntu
- 全志A33/A64移植ubuntu系统记录
- QT-everywhere-opensource-src-4.8.0 移植arm飞凌6410 过程记录(ubuntu11.10+arm-linux-gcc-4.3.2)
- Ubuntu: Debian(Ubuntu) 常用命令大全[记录]
- Ubuntu Feisty 下安装 VirtualBox 全程记录
- Ubuntu: Debian(Ubuntu) 常用命令大全[记录]
- 常见./configure错误记录(Ubuntu)
- U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(3): 汇编空语句
- 移植Linux(ucLinux)到GBA的记录
- ubuntu7.10 安装后配置记录
- Aodv路由协议——将aodv-uu-0.9.3移植到ARM-LINUX中
- windows xp+windows2003+FreeBSD6.2+Ubuntu7.10安装记录
- qtopia 4.2.3 移植 交叉编译记录&总结
- linux的maven+turbine+turque java项目移植到windows eclipse的过程记录
- 使用DECODE语句将记录变换字段 形成交叉表
- Ubuntu下arm交叉编译环境的创建及基于s3c2410的linux2.6.22移植(二)
- [ZT]S3C44B0开发板移植内核2.6 uclinux记录
- u-boot移植点滴记录