error adding symbols: File format not recognized

asked 2020-06-16 01:50:53 -0500

Hello i tried to build opencv via cmake but at 100% i get an error i dont understand. Could somebody pls help me.## Heading Here is the cmd:

[ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/autocalib.cpp.obj

[ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/blenders.cpp.obj [ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/camera.cpp.obj [ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/exposure_compensate.cpp.obj [ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/matchers.cpp.obj [ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/motion_estimators.cpp.obj [ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/seam_finders.cpp.obj [ 95%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/stitcher.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/timelapsers.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/util.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/warpers.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/src/warpers_cuda.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/opencl_kernels_stitching.cpp.obj [ 96%] Building RC object modules/stitching/CMakeFiles/opencv_stitching.dir/vs_version.rc.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_stitching.dir/opencv_stitching_main.cpp.obj [ 96%] Linking CXX shared library ....\bin\libopencv_stitching430.dll [ 96%] Built target opencv_stitching Scanning dependencies of target opencv_test_stitching [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_test_stitching.dir/test/ocl/test_warpers.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_test_stitching.dir/test/test_blenders.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_test_stitching.dir/test/test_blenders.cuda.cpp.obj [ 96%] Building CXX object modules/stitching/CMakeFiles/opencv_test_stitching.dir/test/test_main.cpp.obj [ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_test_stitching.dir/test/test_matchers.cpp.obj [ 97%] Linking CXX executable ....\bin\opencv_test_stitching.exe [ 97%] Built target opencv_test_stitching Scanning dependencies of target opencv_perf_stitching [ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/opencl/perf_stitch.cpp.obj [ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/opencl/perf_warpers.cpp.obj [ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/perf_estimators.cpp.obj [ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/perf_main.cpp.obj [ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/perf_matchers.cpp.obj [ 97%] Building CXX object modules/stitching/CMakeFiles/opencv_perf_stitching.dir/perf/perf_stich.cpp.obj [ 97%] Linking CXX executable ....\bin\opencv_perf_stitching.exe [ 97%] Built target opencv_perf_stitching [ 97%] Processing OpenCL kernels (video) Scanning dependencies of target opencv_video [ 97%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/bgfg_KNN.cpp.obj [ 97%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/bgfg_gaussmix2.cpp.obj [ 97%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/camshift.cpp.obj [ 97%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/dis_flow.cpp.obj [ 98%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/ecc.cpp.obj [ 98%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/kalman.cpp.obj [ 98 ... (more)

edit retag flag offensive close merge delete

Comments

C:/Python/Python38/libs/python38.lib

this is the VC lib, different compiler, you cannot use it with mingw ( there should be a python38.a)

try to use cmake-gui, where you can specify those things explicitly

berak gravatar imageberak ( 2020-06-16 02:40:05 -0500 )edit

i use cmake gui. What should i do to fix the problem

Leon1029 gravatar imageLeon1029 ( 2020-06-16 10:21:02 -0500 )edit

sorry, seem to have things mixed up ;(

there is a PYTHON_LIBRARY entry here, but it's set to C:/prog/Python37-32/python37.dll .

quite confusing.

berak gravatar imageberak ( 2020-06-17 01:42:49 -0500 )edit