my program using opencv

Joshua Root jmr at macports.org
Mon Apr 3 19:40:52 UTC 2017


On 2017-4-4 04:08 , Sébastien DEWAILLY wrote:
> [100%] Linking C executable main
> ld: library not found for -lopencv_shape
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[2]: *** [main] Error 1
> make[1]: *** [CMakeFiles/main.dir/all] Error 2
> make: *** [all] Error 2
>
> It seems that it doesn't find the library opencv_shape.

It's hard to tell when the build system doesn't show the actual commands 
it is running, but you may need to get -L/opt/local/lib (or wherever 
libopencv_shape.dylib is installed) into the flags used when linking, 
perhaps by setting an appropriate cmake variable.

- Josh


More information about the macports-dev mailing list