py_cfar icon indicating copy to clipboard operation
py_cfar copied to clipboard

There is an error in the generated so file, why?

Open mantou22 opened this issue 5 years ago • 4 comments

There is an error in the generated so file, why? Traceback (most recent call last): File "run.py", line 4, in import cfar ImportError: /usr/local/lib/python3.5/dist-packages/cfar.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZN2cv6dilateERKNS_11_InputArrayERKNS_12_OutputArrayES2_NS_6Point_IiEEiiRKNS_7Scalar_IdEE

mantou22 avatar Nov 28 '19 07:11 mantou22

What's your opencv version, please?

mantou22 avatar Dec 04 '19 07:12 mantou22

Hello, please reply after you see it.

mantou22 avatar Dec 13 '19 08:12 mantou22

Hi @mantou22 apology you are facing issues compiling the code. Do you have required libraries used in setup.py? Also I used opencv3.

nasir6 avatar Jan 23 '20 10:01 nasir6

@mantou22 I also meet the same problem, which is caused by lacking two opencv libraties, i.e., opencv_imgproc and opencv_imgcodecs in my situation. The solution is adding them in the dependent libraries. Specifically, change the line 16 of setup.py as "libraries = ['opencv_core', 'opencv_imgproc', 'opencv_imgcodecs', 'opencv_highgui','opencv_video','opencv_videoio', 'gsl', 'gslcblas'],", and then recompile the code. Note the old generated folder "build" must be first deleted before the recompiling.

laoyandujiang avatar Mar 30 '20 08:03 laoyandujiang