ffmpeg: 'UINT64_C' was not declared in this scope
2014-02-13 11:33
489 查看
ffmpeg 是使用C语言写的,默认使用C编译,如果要在C++中调用ffmpeg,则有可能出现错误:
解决办法三种:
一种是:
extern "C"{
#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
}
第二种是在ffmpeg的common.h文件中添加语句:
/usr/local/include/libavutil/common.h中添加:
#ifndef UINT64_C
#define UINT64_C(value)__CONCAT(value,ULL)
#endif
http://code.google.com/p/ffmpegsource/issues/detail?id=11
第三种:
在该头文件加以下语句就行了。
#ifndef INT64_C
#define INT64_C
#define UINT64_C
#endif
这个要放在
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavutil/avutil.h>
}
来源:/article/2122526.html
ffmpeg:
'UINT64_C' was not declared in this scope
解决办法三种:一种是:
extern "C"{
#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif
}
第二种是在ffmpeg的common.h文件中添加语句:
/usr/local/include/libavutil/common.h中添加:
#ifndef UINT64_C
#define UINT64_C(value)__CONCAT(value,ULL)
#endif
http://code.google.com/p/ffmpegsource/issues/detail?id=11
第三种:
在该头文件加以下语句就行了。
#ifndef INT64_C
#define INT64_C
#define UINT64_C
#endif
这个要放在
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavutil/avutil.h>
}
来源:/article/2122526.html
相关文章推荐
- linux 编译ffmpeg 出错:error: 'UINT64_C' was not declared in this scope
- 用g++ 编译 ffmpeg 编译出现 error: 'UINT64_C' was not declared in this scope 或 missing -D__STDC_CONSTANT_MACROS
- 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope
- error: 'UINT64_C' was not declared in this scope
- common.h:178:47: error: 'UINT64_C' was not declared in this scope
- FFmpeg:'UINT64_C' was not declared in ths scope
- 昨天的错误修改后,make出现error: 'UINT64_C' was not declared in this scope
- 'htons' was not declared in this scope 解决
- ffmpeg中遇到UINT64_C’ was not declared in this scope
- error: 'EOF' was not declared in this scope的解决办法
- ffmpeg中遇到UINT64_C’ was not declared in this scope
- error: 'ff_get_buffer' was not declared in this scope
- qt-everywhere-opensource-src-4.8.1 出错:error: 'IPV6_MULTICAST_HOPS' was not declared in this scope
- ffmpeg中遇到UINT64_C’ was not declared in this scope
- ffmpeg: ‘UINT64_C’ was not declared in this scope
- error: '_localtime_not_threadsafe_' was not declared in this scope
- error: 'EOF' was not declared in this scope的解决办法
- In function 'int av_clipl_int32_c(int64_t)': error: 'UINT64_C' was not declared in this scope
- linux下进行视频解码时调用ffmpeg的动态库出现error: ‘UINT64_C’ was not declared in this scope
- ffmpeg中遇到UINT64_C’ was not declared in this scope