linux arm cross-compiling, problem with linking OpenCV so libraries

asked 2016-04-09 15:36:02 -0600

densvr gravatar image

Hello.

I am building a c++ project for arm with OpenCV dependencies and getting some errors:

Linking CXX executable VehicleDetection
/home/densvr/lib/opencv/opencv-3.1.0/build_arm/lib/libopencv_videostab.so.3.1.0: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[2]: *** [VehicleDetection] Error 1
make[1]: *** [CMakeFiles/VehicleDetection.dir/all] Error 2
make: *** [all] Error 2

OpenCV was successfully builded for arm according to instructions on opencv.org

Please help me to find out how to fix this problem.

Here is my project's CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR) # Проверка версии CMake.
                                    # Если версия установленой программы
                                    # старее указаной, произайдёт аварийный выход.

project( VehicleDetectionDemo )

set( CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set( CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
find_package( OpenCV REQUIRED )

include_directories(JSON-CPP-master/JSON)
add_executable( VehicleDetection 
    #src files
    )

target_link_libraries( VehicleDetection ${OpenCV_LIBS} )
edit retag flag offensive close merge delete