当使用Qt + opencv + ffmpeg时,在Mac上找不到体系结构x86_64的符号 [英] symbol(s) not found for architecture x86_64 on Mac when using Qt+opencv+ffmpeg
本文介绍了当使用Qt + opencv + ffmpeg时,在Mac上找不到体系结构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 64位/ usr / bin)来编译,它显示
错误:没有为架构找到符号x86_64
/ p $ p
当我使用Clang(x86 64bit in / usr / bin)进行编译时,会显示
错误:没有为架构找到符号x86_64
错误:链接器命令失败,退出代码1(使用-v查看调用)
我使用的是OS X Yosemite 10.10.4 。有没有人知道如何解决它?
解决方案您已经包含路径与 INCLUDEPATH
而不是图书馆本身与 LIBS
也许 或这个的答案可以帮助你:
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 with LIBS
Maybe this or this answer helps you:
这篇关于当使用Qt + opencv + ffmpeg时,在Mac上找不到体系结构x86_64的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文