linux - cross-compile error with opencv -


root@pyimagesearch:~/practicecode/helloworld# cmake -dcmake_toolchain_file=toolchain.arm.cmake . -- c compiler identification gnu -- cxx compiler identification gnu -- check working c compiler: /usr/bin/arm-linux-gnueabi-gcc -- check working c compiler: /usr/bin/arm-linux-gnueabi-gcc -- works -- detecting c compiler abi info -- detecting c compiler abi info - done -- check working cxx compiler: /usr/bin/arm-linux-gnueabi-g++ -- check working cxx compiler: /usr/bin/arm-linux-gnueabi-g++ -- works -- detecting cxx compiler abi info -- detecting cxx compiler abi info - done -- configuring done -- generating done -- build files have been written to: /root/practicecode/helloworld root@pyimagesearch:~/practicecode/helloworld# make scanning dependencies of target helloworld [100%] building cxx object cmakefiles/helloworld.dir/main.cpp.o linking cxx executable helloworld /usr/local/lib/libopencv_videostab.so.2.4.8: file not recognized: file format not recognized collect2: ld returned 1 exit status make[2]: *** [helloworld] error 1 make[1]: *** [cmakefiles/helloworld.dir/all] error 2 make: *** [all] error 2 

in order check library , test compilation, wrote simple hello world program. can see, cmake works, when use make, there same error:

file not recognized!!! libopencv_videostab.so.2.4.8 exists in directory.

this cmakelists.txt:

cmake_minimum_required(version 2.8) project( helloworld ) find_package( opencv required ) add_executable( helloworld main.cpp ) target_link_libraries( helloworld ${opencv_libs} ) 

and toolchain.arm.cmake file:

set(cmake_c_compiler /usr/bin/arm-linux-gnueabi-gcc) set(cmake_cxx_compiler /usr/bin/arm-linux-gnueabi-g++) set(cmake_linker /usr/bin/arm-linux-gnueabi-ld) set(cmake_nm /usr/bin/arm-linux-gnueabi-nm) set(cmake_objcopy /usr/bin/arm--gnueabi-objcopy) set(cmake_objdump /usr/bin/arm-linux-gnueabi-objdump) set(cmake_ranlib /usr/bin/arm-linux-gnueabi-ranlib) 

can me? need use 'opencv' library.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -