mac os 调用ffmpeg静态库,编译失败

lovexiaokai 2018-08-09 12:22:22
#include <iostream>
using namespace std;

extern "C" {
#include "libavcodec/avcodec.h"
}
int main(int argc, const char * argv[]) {
// insert code here...
avcodec_register_all();
cout << "Hello, World!\n";
return 0;
}
源码如上,编译报错如下
Undefined symbols for architecture x86_64:
"_avcodec_register_all", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
配置如下,请问如何解决, 试了网上的办法, 也不行。求指教
![图片说明](https://img-ask.csdn.net/upload/201808/09/1533745126_227822.png)
...全文
216 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

18,777

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧