- 首先安装ffmpeg
brew install ffmpeg
- 创建xcode工程
- 配置Header 和 Library Search Path
- 把usr/local/lib目录下的相关依赖拖进去
- 更改main.cpp测试
#if defined(__cplusplus) extern "C" { #endif #include#if defined(__cplusplus) } #endif #include using namespace std; int main() { cout << "avcodec_configuration : " << avcodec_configuration() << endl; return 0; }



