I'm running a project using Qt+opencv+ffmpeg on Mac, but it comes to an error: symbol(s) not found for architecture x86_64.
Part of .pro:
INCLUDEPATH += /usr/local/include
INCLUDEPATH += /usr/local/include/opencv
INCLUDEPATH += /usr/local/include/opencv2
LIBS += -L/usr/local/lib -lavformat -lavcodec -lavutil
When I use GCC (x86 64bit in /usr/bin) to compile, it shows
error: symbol(s) not found for architecture x86_64
When I use Clang (x86 64bit in /usr/bin) to compile, it shows
error: symbol(s) not found for architecture x86_64
error: linker command failed with exit code 1 (use -v to see invocation)
I'm using OS X Yosemite 10.10.4. Does anybody know how to fix it?
You have included the path with
INCLUDEPATH
but not the library itselfs withLIBS
Maybe this or this answer helps you: