如何将Ubuntu11中的Eclipse Indigo链接到FFMPEG 8 for C++
How to link Eclipse Indigo in Ubuntu 11 to FFMPEG 8 for C++
我已经尝试了书中的一切,以及我能找到的关于如何做到这一点的一切,并多次重新安装、重新配置和重建,但都无济于事。这就是我所拥有的。我在Ubuntu虚拟机上制作了FFMPEG,并编写了以下代码:
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include <stdio.h>
#include <iostream>
using namespace std;
int main( int argc, char* argv[] ) {
avcodec_register_all();
return 0;
}
这个错误并说:
/home/adam/workspace/MP4 Tools/Debug/../testDriver.cpp:19: undefined reference to `avcodec_register_all()'
collect2: ld returned 1 exit status
我已经包含了libavcodec.a文件。项目->属性->GCC C++链接器->库->添加"avcodec"
有人能想到我没有做或忽略的事情吗?非常感谢。
我在这里发布了一个解决方案
但不要忘记,如果您使用c++,您应该以这种方式包含ffmpeg标头:
extern "C"{
#include<libavformat/avformat.h>
#include<libavcodec/avcodec.h>
}
相关文章:
- "error: no matching function for call to"构造函数错误
- 表示"accepting anything for this template argument" C++概念的通配符
- 如何在C++中从两个单独的for循环中添加两个数组
- 在Linux for Windows上编译C++代码时出错
- 调用专用模板时出错"no matching function for call to [...]"
- FFmpeg:制作一个应用程序比直接使用ffmepg更好吗
- 为什么我的for循环不能正确获取argv
- 为什么我不能在 FOR LOOP 中使用 i/10,C++?
- Arduino:for/while/if在void setup()或void loop()之前?——错误:之前需要不合格
- 在基于范围的for循环中使用结构化绑定声明
- 通过for循环使用用户输入填充列表
- 使用for循环检查数组中的重复项
- 在for循环中使用auto vs decltype(vec.size())来处理字符串的向量
- 为什么 const std::p air<K,V>& 在 std::map 上基于范围的 for 循环不起作用?
- 正在使用for循环创建QScatterSerie
- Python中的for循环与C++有何不同
- std::memory_order for std::atomic:<T>:wait
- 在更改for循环的第三部分后,未使用for循环结果
- Windows libs for ffmpeg don't link (visual studio)?
- 如何将Ubuntu11中的Eclipse Indigo链接到FFMPEG 8 for C++