如何在Windows XP上正确安装ffmpeg
How to correctly install ffmpeg on windows XP?
我正在Windows上做C++涉及FFmpeg库的项目。问题是我无法将 ffmpeg 库包含在我的项目中。我什至无法运行任何 ffmpeg 教程或示例。我总是收到如下错误:
tutorial01.c:22:28: ffmpeg/avcodec.h: No such file or directory
tutorial01.c:23:29: ffmpeg/avformat.h: No such file or directory
以及许多错误,例如:
tutorial01.c:33: error: `iFrame' undeclared (first use in this function)
我找到了包含以下说明的教程:
//gcc -o tutorial01 tutorial01.c -lavformat -lavcodec -lz
//to build (assuming libavformat and libavcodec are correctly installed
//your system).
经过进一步搜索,我发现我应该从这里获得一个静态构建库版本:http://ffmpeg.zeranoe.com/builds/然后我按照以下说明安装了这个库:
- 从 arrozcru 自动构建页面获取最新版本
- 将文件夹解压缩到 C:/Program Files/ffmpeg 中
- 将 C:/Program Files/ffmpeg/bin 添加到系统的 PATH 环境变量中
但我仍然有同类的编译错误。因此,似乎安装不正确。
我应该怎么做才能将 ffmpeg 库连接到我在 Windows 上的项目?
所以为了总结答案,你需要将 ffmpeg 的 include 和 lib 目录添加到 gcc 的目录路径中。
相关文章:
- 在Ubuntu 16.04上安装Cilk时出现问题
- FFmpeg:制作一个应用程序比直接使用ffmepg更好吗
- 在CMakeLists.txt的安装功能中使用.cmake文件有什么用
- C++:如何在CLion IDE中安装Boost
- 使用FFMPEG将RGB图像序列保存到.mp4时出现问题
- FFMPEG配置文件级别id大小无效
- 安装opencv失败-粘贴CMakeError.log的内容
- FFMpeg库:如何在音频文件中精确查找
- 在cygwin中测试新的boost安装时出现cpp错误
- 有人安装"IITB Simplecpp in mac"吗?
- 我可以在 Arduino 的库文件夹之外安装库吗?
- Mingw-64 在构建和安装后不会编译 openCV 代码
- 为什么构建目录中新构建的共享库与安装目录中的副本具有不同的依赖项集?
- 安装 libc++ 时出现问题
- 安装MinGW后C++编译器不起作用?
- 介子复制/安装头文件到输出目录并保持文件夹结构
- 无法安装 R 包 "nloptr"(Ubuntu 16.04 上的 R3.6.2) - C++编译器问题
- 如何在 Ubuntu 上安装 OpenCV for C/C++
- 如何在 Debian 7 上安装 FFmpeg 开发者库
- 如何在Windows XP上正确安装ffmpeg