我正在 ffmpeg 中编译以下简单代码。
#include "stdafx.h"
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
void main()
{
av_register_all();
}
Run Code Online (Sandbox Code Playgroud)
我在项目属性中包含的所有 ffmpeg 头文件。但我在编译时遇到以下错误。
错误 1 错误 C1004:发现意外的文件结尾 dev\include\libavutil\common.h 87 1
问候玛雅克
小智 6
__STDC_CONSTANT_MACROS在包含这些标题之前尝试定义以查看问题是否可以解决。
#include "stdafx.h"
extern "C" {
#define __STDC_CONSTANT_MACROS
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
};
Run Code Online (Sandbox Code Playgroud)
见http://bigbang.waterlin.org/bang/using-ffmpeg-under-windows-visual-cpp-environment/
问候zcy
| 归档时间: |
|
| 查看次数: |
2269 次 |
| 最近记录: |