使用 Qt+opencv+ffmpeg 时,在 Mac 上找不到体系结构 x86_64 的符号
symbol(s) not found for architecture x86_64 on Mac when using Qt+opencv+ffmpeg
我是 运行 一个在 Mac 上使用 Qt+opencv+ffmpeg 的项目,但出现错误:未找到架构 x86_64 的符号。
.pro 的一部分:
INCLUDEPATH += /usr/local/include
INCLUDEPATH += /usr/local/include/opencv
INCLUDEPATH += /usr/local/include/opencv2
LIBS += -L/usr/local/lib -lavformat -lavcodec -lavutil
当我用GCC(x86 64bit in /usr/bin)编译时,显示
error: symbol(s) not found for architecture x86_64
当我使用 Clang (x86 64bit in /usr/bin) 编译时,它显示
error: symbol(s) not found for architecture x86_64
error: linker command failed with exit code 1 (use -v to see invocation)
我正在使用 OS X Yosemite 10.10.4。有人知道怎么解决吗?
您在 INCLUDEPATH
中包含了路径,但在 LIBS
中没有包含库本身
也许 this or this 回答对您有帮助:
我是 运行 一个在 Mac 上使用 Qt+opencv+ffmpeg 的项目,但出现错误:未找到架构 x86_64 的符号。
.pro 的一部分:
INCLUDEPATH += /usr/local/include
INCLUDEPATH += /usr/local/include/opencv
INCLUDEPATH += /usr/local/include/opencv2
LIBS += -L/usr/local/lib -lavformat -lavcodec -lavutil
当我用GCC(x86 64bit in /usr/bin)编译时,显示
error: symbol(s) not found for architecture x86_64
当我使用 Clang (x86 64bit in /usr/bin) 编译时,它显示
error: symbol(s) not found for architecture x86_64
error: linker command failed with exit code 1 (use -v to see invocation)
我正在使用 OS X Yosemite 10.10.4。有人知道怎么解决吗?
您在 INCLUDEPATH
中包含了路径,但在 LIBS
也许 this or this 回答对您有帮助: