AnsweredAssumed Answered

The problem in building opencv via eclipse

Question asked by ding maoshi on Sep 21, 2015
Latest reply on Sep 24, 2015 by ding maoshi

Hello everybody!

  

 

 

I'm trying to compile opencv example in eclipse enviroment.I followed the doc https://community.freescale.com/docs/DOC-106613

 

 

.I modified  the  makefile.am like the following :

 

 

------------------------------------------------------------

 

 

bin_PROGRAMS = opencv_sample

 

 

opencv_sample_SOURCES = opencv_sample.cpp

 

 

 

 

AM_CXXFLAGS = @opencv_sample_CFLAGS@ -I/home/ding/fsl-community-bsp/buildimx/tmp/sysroots/imx6sxsabresd/usr/include

 

 

AM_LDFLAGS = @opencv_sample_LIBS@   -L/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/opencvlib  -lopencv_core  -lopencv_highgui  -lopencv_imgproc -lopencv_photo

 

 

 

 

CLEANFILES = *~

 

 

 

 

-------------------------------------------------------------------------------------

 

 

 

 

 

 

but the eclipse console always says:

 

 

 

 

-------------------------------------------------------------------------------------

 

 

make all

make  all-recursive

make[1]: 正在进入目录 `/home/ding/workspace/opencv_sample'

Making all in src

make[2]: 正在进入目录 `/home/ding/workspace/opencv_sample/src'

../arm-poky-linux-gnueabi-

 

 

libtool  --tag=CXX   --mode=link arm-poky-linux-gnueabi-g++  -march=armv7-a -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -I/home/ding/fsl-

 

 

community-bsp/buildimx/tmp/sysroots/imx6sxsabresd/usr/include  -g -O0  --sysroot=/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -L/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-

 

 

gnueabi/opencvlib  -lopencv_core  -lopencv_highgui  -lopencv_imgproc -lopencv_photo --sysroot=/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-gnueabi   -o opencv_sample opencv_sample.o 

arm-

 

 

poky-linux-gnueabi-libtool: link: arm-poky-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -I/home/ding/fsl-

 

 

community-bsp/buildimx/tmp/sysroots/imx6sxsabresd/usr/include -g -O0 --sysroot=/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-gnueabi --sysroot=/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-

 

 

linux-gnueabi -o opencv_sample opencv_sample.o  -L/opt/poky/1.8/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/opencvlib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_photo

/opt/poky/1.8/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld:

 

 

cannot find /lib/libc.so.6

/opt/poky/1.8/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld:

cannot find /usr/lib/libc_nonshared.a

/opt/poky/1.8/sysroots/i686-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.9.2/ld:

cannot find /lib/ld-linux-armhf.so.3

 

 

 

 

make[2]:正在离开目录 `/home/ding/workspace/opencv_sample/src'

collect2: error: ld returned 1 exit status

make[1]:正在离开目录 `/home/ding/workspace/opencv_sample'

make[2]: *** [opencv_sample] 错误 1

make[1]: *** [all-recursive] 错误 1

 

 

-------------------------------------------------------------------------------------

 

 

 

 

 

 

 

 

What's the problem? ?

 

 

Best regards!  Thank you!

 

                 Ding

Outcomes