博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ffmpeg中遇到UINT64_C’ was not declared in this scope
阅读量:4160 次
发布时间:2019-05-26

本文共 1073 字,大约阅读时间需要 3 分钟。

fmpeg 默认是用C文件来编译的,如果某个CPP文件想引用ffmpeg中的某些函数或者头文件,有可能出现

‘UINT64_C’ was not declared in this scope的错误

情形大概如下

The same issue i'm getting here when compiling chromium with ffmpeg from svn:

In file included from /usr/include/libavutil/avutil.h:81:0,

from /usr/include/libavcodec/avcodec.h:30,                

 from out/Release/obj.target/geni/ffmpeg_stubs.cc:16:

/usr/include/libavutil/common.h: In function 'int32_t av_clipl_int32(int64_t)':

/usr/include/libavutil/common.h:154:47: error: 'UINT64_C' was not declared in this scope

make: *** [out/Release/obj.target/geni/ffmpeg_stubs.o] Error 1

可以 在cpp文件中加入

extern "C"{

#ifdef __cplusplus

 #define __STDC_CONSTANT_MACROS
 #ifdef _STDINT_H
  #undef _STDINT_H
 #endif
 # include <stdint.h>
#endif

}

或者

/usr/local/include/libavutil/common.h: In function ‘int32_t av_clipl_int32_c(int64_t)’:

/usr/local/include/libavutil/common.h:170: error: ‘UINT64_C’ was not declared in this scope

这个问题可以这么解决

编辑文件  gedit /usr/local/include/libavutil/common.h

添加如下代码可以解决。

//add by bg2bkk

#ifndef UINT64_C
#define UINT64_C(value) __CONCAT(value, ULL)
#endif
//add by bg2bkk

转载地址:http://tvdxi.baihongyu.com/

你可能感兴趣的文章
【Python基础6】格式化字符串
查看>>
【Python基础7】字典
查看>>
【Python基础8】函数参数
查看>>
【Python基础9】浅谈深浅拷贝及变量赋值
查看>>
Jenkins定制一个具有筛选功能的列表视图
查看>>
【Python基础10】探索模块
查看>>
【Python】将txt文件转换为html
查看>>
[Linux]Shell脚本实现按照模块信息拆分文件内容
查看>>
idea添加gradle模块报错The project is already registered
查看>>
在C++中如何实现模板函数的外部调用
查看>>
在C++中,关键字explicit有什么作用
查看>>
C++中异常的处理方法以及使用了哪些关键字
查看>>
内存分配的形式有哪些? C++
查看>>
什么是内存泄露,如何避免内存泄露 C++
查看>>
栈和堆的空间大小 C++
查看>>
什么是缓冲区溢出 C++
查看>>
sizeof C++
查看>>
使用指针有哪些好处? C++
查看>>
引用还是指针?
查看>>
checkio-non unique elements
查看>>