ld: library not found for existing opencv libraries OSX

asked 2017-09-28 04:40:33 -0500

longvt gravatar image

I try to compile code with opencv 3.3.0 by makefile as below:

LIBS_OPENCV = $(PREFIX)pkg-config --libs opencv

INCLUDE_OPENCV = $(PREFIX)pkg-config --cflags opencv


gcc -std=c99 -O3 -Wall -Werror -pedantic -Wno-unused-function -Wno-unused-parameter -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -c vibe-background-sequential.c

gcc -o main -std=c99 -O3 -Wall -Werror -pedantic your-main-file-sequential.c vibe-background-sequential.o

g++ -o main-opencv -O3 -Wall -Werror -pedantic $(INCLUDE_OPENCV) main-opencv.cpp vibe-background-sequential.o $(LIBS_OPENCV)

However, i get the error: ld: library not found for -llibopencv_stitching.3.3.0.dylib, Inpact, not only libopencv_stitching.3.3.0.dylib, it not found for all libraries of OPENCV while them exist ( as i check in picture below).

image description

image description

I don't know where is prolem? Thanks for any help!

edit retag flag offensive close merge delete


Hello, could you solve this issue? I have been stuck with the same problem for a while.

strwbrrymlk gravatar imagestrwbrrymlk ( 2019-11-22 13:28:21 -0500 )edit