OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 6184|回复: 2

opencv 在 TQ2440下移植后,编译出现下面的错误

[复制链接]
发表于 2011-4-4 11:26:38 | 显示全部楼层 |阅读模式
按照opencv中文网站上说的做,在编译drawing.c的时候,出现以下错误,希望哪位大哥指导下。

cc1: warning: include location "/usr/local/include/opencv" is unsafe for cross-compilation
/opt/EmbedSky/4.3.3/bin/../lib/gcc/arm-none-linux-

gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation
/usr/local/lib/libcv.a(cvshapedescr.o): In function `icvFitEllipse_F(CvSeq*, CvBox2D*)':
cvshapedescr.cpp.text+0x4254): undefined reference to

`cvEigenVV'
/usr/local/lib/libcv.a(cvlinefit.o): In function `icvFitLine3D_wods(CvPoint3D32f*, int, float*, float*)':
cvlinefit.cpp.text+0xbb0): undefined

reference to `cvEigenVV'
/usr/local/lib/libcv.a(cvthresh.o): In function `cvThreshold':
cvthresh.cpp.text+0xbb0): undefined reference to `cvCmpS'
cvthresh.cpp.text+0xc38): undefined reference to `cvAndS'
/usr/local/lib/libcv.a(cvderiv.o): In function `CvLaplaceFilter::~CvLaplaceFilter()':
cvderiv.cpp.text+0x28f0): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvderiv.o): In function `CvLaplaceFilter::~CvLaplaceFilter()':
cvderiv.cpp.text+0x2930): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvderiv.o): In function `CvLaplaceFilter::~CvLaplaceFilter()':
cvderiv.cpp.text+0x2958): undefined reference to `operator delete(void*)'
cvderiv.cpp.text+0x2978): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvderiv.o): In function `CvLaplaceFilter::CvLaplaceFilter(int, int, int, bool, int, int, CvScalar)':
cvderiv.cpp.text+0x2a10):

undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvderiv.o): In function `CvLaplaceFilter::CvLaplaceFilter(int, int, int, bool, int, int,

CvScalar)':
cvderiv.cpp.text+0x2aa8): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvderiv.o): In function `cvSobel':
cvderiv.cpp:

(.text+0x34b8): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvderiv.o): In function `cvLaplace':
cvderiv.cpp:(.text+0x3984): undefined

reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvderiv.o):cvderiv.cpp:(.text+0x3998): more undefined references to `__cxa_end_cleanup' follow
/usr/local/lib/libcv.a(cvderiv.o):(.ARM.extab+0x0): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvderiv.o):(.ARM.extab+0x18):

undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvderiv.o):(.ARM.extab+0x30): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvderiv.o):(.ARM.extab+0x48): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvderiv.o):(.ARM.extab+0x64):

undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvderiv.o):(.ARM.extab+0x80): more undefined references to `__gxx_personality_v0'

follow
/usr/local/lib/libcv.a(cvmorph.o): In function `CvMorphology::CvMorphology(int, int, int, int, CvMat*, CvSize, CvPoint, int, CvScalar)':
cvmorph.cpp:

(.text+0x3ce8): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvmorph.o): In function `CvMorphology::CvMorphology(int, int, int, int,

CvMat*, CvSize, CvPoint, int, CvScalar)':
cvmorph.cpp:(.text+0x3da4): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvmorph.o): In

function `CvMorphology::~CvMorphology()':
cvmorph.cpp:(.text+0x3e44): undefined reference to `operator delete(void*)'
cvmorph.cpp:(.text+0x3e64): undefined

reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvmorph.o): In function `CvMorphology::~CvMorphology()':
cvmorph.cpp:(.text+0x3ebc): undefined

reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvmorph.o): In function `CvMorphology::~CvMorphology()':
cvmorph.cpp:(.text+0x3f14): undefined

reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvmorph.o): In function `icvMorphOp(void const*, void*, _IplConvKernel*, int, int)':
cvmorph.cpp:

(.text+0x4bf0): undefined reference to `__cxa_end_cleanup'
cvmorph.cpp:(.text+0x4c04): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a

(cvmorph.o):(.ARM.extab+0x0): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvmorph.o):(.ARM.extab+0x1c): undefined reference to

`__gxx_personality_v0'
/usr/local/lib/libcv.a(cvmorph.o):(.ARM.extab+0x38): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvmorph.o):

(.ARM.extab+0x50): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvmorph.o):(.ARM.extab+0x68): undefined reference to

`__gxx_personality_v0'
/usr/local/lib/libcv.a(cvmorph.o):(.ARM.extab+0x80): more undefined references to `__gxx_personality_v0' follow
/usr/local/lib/libcv.a(cvfilter.o): In function `CvLinearFilter::CvLinearFilter(int, int, int, CvMat const*, CvPoint, int, CvScalar)':
cvfilter.cpp:

(.text+0xf4e0): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o): In function `CvLinearFilter::CvLinearFilter(int, int, int,

CvMat const*, CvPoint, int, CvScalar)':
cvfilter.cpp:(.text+0xf5a8): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o): In

function `CvSepFilter::CvSepFilter(int, int, int, CvMat const*, CvMat const*, CvPoint, int, CvScalar)':
cvfilter.cpp:(.text+0xf67c): undefined reference to

`__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o): In function `CvSepFilter::CvSepFilter(int, int, int, CvMat const*, CvMat const*, CvPoint, int,

CvScalar)':
cvfilter.cpp:(.text+0xf750): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o): In function

`CvBaseImageFilter::~CvBaseImageFilter()':
cvfilter.cpp:(.text+0xf7f4): undefined reference to `operator delete(void*)'
/usr/local/lib/libcv.a(cvfilter.o):

In function `CvSepFilter::~CvSepFilter()':
cvfilter.cpp:(.text+0xf888): undefined reference to `operator delete(void*)'
cvfilter.cpp:(.text+0xf8a8):

undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o): In function `CvSepFilter::~CvSepFilter()':
cvfilter.cpp:(.text+0xf918):

undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o): In function `CvSepFilter::~CvSepFilter()':
cvfilter.cpp:(.text+0xf988):

undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o): In function `CvLinearFilter::~CvLinearFilter()':
cvfilter.cpp:(.text+0xf9e8):

undefined reference to `operator delete(void*)'
cvfilter.cpp:(.text+0xfa08): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o):

In function `CvLinearFilter::~CvLinearFilter()':
cvfilter.cpp:(.text+0xfa80): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o):

In function `CvLinearFilter::~CvLinearFilter()':
cvfilter.cpp:(.text+0xfaf8): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o):

In function `cvFilter2D':
cvfilter.cpp:(.text+0x10344): undefined reference to `__cxa_end_cleanup'
cvfilter.cpp:(.text+0x10358): undefined reference to

`__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvfilter.o):(.ARM.extab+0x0): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvfilter.o):

(.ARM.extab+0x18): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvfilter.o):(.ARM.extab+0x30): undefined reference to

`__gxx_personality_v0'
/usr/local/lib/libcv.a(cvfilter.o):(.ARM.extab+0x48): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a

(cvfilter.o):(.ARM.extab+0x60): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvfilter.o):(.ARM.extab+0x78): more undefined references

to `__gxx_personality_v0' follow
/usr/local/lib/libcv.a(cvsmooth.o): In function `CvBoxFilter::~CvBoxFilter()':
cvsmooth.cpp:(.text+0x2580): undefined

reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvsmooth.o): In function `CvBoxFilter::~CvBoxFilter()':
cvsmooth.cpp:(.text+0x25c0): undefined

reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvsmooth.o): In function `CvBoxFilter::~CvBoxFilter()':
cvsmooth.cpp:(.text+0x25e8): undefined

reference to `operator delete(void*)'
cvsmooth.cpp:(.text+0x2608): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvsmooth.o): In function

`CvBoxFilter::CvBoxFilter(int, int, int, bool, CvSize, CvPoint, int, CvScalar)':
cvsmooth.cpp:(.text+0x26c8): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvsmooth.o): In function `CvBoxFilter::CvBoxFilter(int, int, int, bool, CvSize, CvPoint, int, CvScalar)':
cvsmooth.cpp:(.text+0x2788):

undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvsmooth.o): In function `cvSmooth':
cvsmooth.cpp:(.text+0x7fe0): undefined reference to

`__cxa_end_cleanup'
cvsmooth.cpp:(.text+0x7ffc): undefined reference to `__cxa_end_cleanup'
/usr/local/lib/libcv.a(cvsmooth.o):(.ARM.extab+0xc): undefined

reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvsmooth.o):(.ARM.extab+0x24): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvsmooth.o):(.ARM.extab+0x3c): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvsmooth.o):(.ARM.extab+0x54):

undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvsmooth.o):(.ARM.extab+0x70): undefined reference to `__gxx_personality_v0'
/usr/local/lib/libcv.a(cvsmooth.o):(.ARM.extab+0x8c): more undefined references to `__gxx_personality_v0' follow
/usr/local/lib/libcv.a(cvtemplmatch.o): In

function `icvCrossCorr(void const*, void const*, void*, CvPoint)':
cvtemplmatch.cpp:(.text+0x29c): undefined reference to `cvGetOptimalDFTSize'
cvtemplmatch.cpp:(.text+0x2bc): undefined reference to `cvGetOptimalDFTSize'
cvtemplmatch.cpp:(.text+0x670): undefined reference to `cvDFT'
cvtemplmatch.cpp:(.text+0xa30): undefined reference to `cvDFT'
cvtemplmatch.cpp:(.text+0xa94): undefined reference to `cvMulSpectrums'
cvtemplmatch.cpp:

(.text+0xaa8): undefined reference to `cvDFT'
cvtemplmatch.cpp:(.text+0xf24): undefined reference to `cvGetOptimalDFTSize'
collect2: ld returned 1 exit

status
回复

使用道具 举报

 楼主| 发表于 2011-4-4 12:51:37 | 显示全部楼层

opencv 在 TQ2440下移植后,编译出现下面的错误

哪位大哥指点一下吧,纠结中
回复 支持 反对

使用道具 举报

发表于 2011-11-18 10:51:23 | 显示全部楼层

opencv 在 TQ2440下移植后,编译出现下面的错误

关于Android对C++的支持:
Files libstdc++.* from your Ubuntu are x86 (or x86_64) binaries but
Android devices and emulators are ARM. Of course, this will not work
anyway, even if you’ll set correct soname. This is very naive way which
leads nowhere.
Android has very limited support of C++ meaning there is no exceptions,
standard C++ library (including STL) and RTTI. If you need such
functionality, use my custom NDK distribution from
<!-- m --><a class=\"postlink\" href=\"http://crystax.net/android/ndk.php\">http://crystax.net/android/ndk.php</a><!-- m --> – it support full C++ features listed
above.
即android本身支持的c++无异常处理、RTTI,c++标准库等。
不过有人定制了一个NDK,全支持这些了。

为什么会出现如:error: undefined reference to ‘__cxa_end_cleanup’ 的链接错误。Android上用stlport时。因为没有链接到libstdc++.a。所以出错。
因为用到了一些静态库, 所以必须要链接完整的libstdc++.a。可以在
<!-- m --><a class=\"postlink\" href=\"http://crystax.net/android/ndk.php\">http://crystax.net/android/ndk.php</a><!-- m -->这里下载的包里
sources\\cxx-stl\\gnu-libstdc++\\libs\\armeabi目录中找到。
Android上本身的libstdc++支持有限,所以必须链接到一个完整的libstdc++.a才行。
在Android.mk文件中加入
LOCAL_LDFLAGS = $(LOCAL_PATH)/libs/libcurl.a \\
$(LOCAL_PATH)/libs/libstdc++.a
以及LOCAL_CPPFLAGS += -lstdc++就可以编译通过了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-5-4 02:24 , Processed in 0.009343 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表