ffmpeg 默认是用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::,

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

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

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

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

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

可以 在cpp文件中加入

extern "C"{

#ifdef __cplusplus
#define __STDC_CONSTANT_MACROS
#ifdef _STDINT_H
#undef _STDINT_H
#endif
# include <stdint.h>
#endif } 来解决 如果在android下用编译。在Android.mk加入 LOCAL_CFLAGS := -D__STDC_CONSTANT_MACROS即可

http://blog.csdn.net/cjsafty/article/details/7041518

ffmpeg: ‘UINT64_C’ was not declared in this scope (转)的更多相关文章

  1. 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope

    解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...

  2. In function 'int av_clipl_int32_c(int64_t)': error: 'UINT64_C' was not declared in this scope

    cygwin下使用ndk编译jni时遇到的错误: /ffmpeg/include/libavutil/common.h: In function 'int av_clipl_int32_c(int64 ...

  3. 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题

    环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...

  4. 用g++ 编译 ffmpeg 编译出现 error: 'UINT64_C' was not declared in this scope 或 missing -D__STDC_CONSTANT_MACROS

    在 libavutil/common.h 下 添加如下,即可解决 #ifdef __cplusplus#define __STDC_CONSTANT_MACROS#ifdef _STDINT_H#un ...

  5. was not declared in this scope

    “was not declared in this scope”是一个错误信息,在编译的时候会遇到.其含义为标识符在其出现的地方是未被定义的. 出现该错误的时候,会同时把未定义的变量名显示出来.比如如 ...

  6. error: 'LOGE' was not declared in this scope

    移植了下HAL,发现编译出现如下错误 error: 'LOGE' was not declared in this scope 比较了一下android4.1的 system/core/include ...

  7. c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow

    c++ - fcgio.cpp:50: error: 'EOF' was not declared in this scope - Stack Overflow fcgio.cpp:50: error ...

  8. 【QT】error: 'SIGNAL' was not declared in this scope

    error: 'SIGNAL' was not declared in this scope  未在此范围内声明. connect(ui->Btnshowhello,SIGNAL(clicked ...

  9. 【error】'isnan' was not declared in this scope

    error问题 'isnan' was not declared in this scope isnan在cmath中被取消宏定义: // These are possible macros impo ...

随机推荐

  1. dajngo之中间件总结

    一.中间件:    a.中间件是什么?       - 中间件是一个类    b. 返回值注意       -(1)无返回值:继续执行后续函数中间件和视图函数       -(2)有返回值:执行自己的 ...

  2. Python之单例模式总结

    一.单例模式 a.单例模式分为四种:文件,类,基于__new__方法实现单例模式,基于metaclass方式实现 b.类实现如下: class Sigletion(objects): import t ...

  3. Haproxy与OpenStack-API安全

    转 http://wsfdl.com/devops/2014/12/24/Haproxy%E4%B8%8EOpenStack-API%E5%AE%89%E5%85%A8.html Haproxy 作为 ...

  4. Spring Boot入门——thymeleaf模板使用

    使用步骤 1.在pom.xml中引入thymeleaf <!-- thymeleaf插件 --> <dependency> <groupId>org.springf ...

  5. MVC3 学习总结

        1.项目文件结构 controllers,views 2.Model特性实现模型的客户端和服务端的验证   1)自带特性   2)扩展特性,或者重写特性   3.实现MVC filter 的类 ...

  6. c++中函数参数传递(值传递、指针传递,引用传递)进一步认识

    概念    首先从概念上来说一下这几种函数传参方式及区别:    1.值传递:形参是实参的拷贝,改变函数形参的值并不会影响外部实参的值,这是最常用的一种传参方法,也是最简单的一种传参方法,只需要传递参 ...

  7. App自动化测试探索(一)借助Appium实现APP的自动化测试

    移动应用测试十大要领: 选择系统平台 选择测试设备的品牌 注意行业和设备区分 关注Android的更新 不要忘记老设备 灵活使用Web分析工具 注意区分地区.运营商和网络技术 掌握智能手机的屏幕分辨率 ...

  8. 面试题46:求1+2+...+n

    题目:求1+2+...+n,要求不能使用乘除法.for.while.if.else.swithc.case等关键字及条件判断语句(A?B:C). 解法一:利用构造函数求解 class Temp { p ...

  9. 16_游戏编程模式ServiceLocator 服务定位

    ####简单说,就是某个系统作为一个服务,对全局系统可见. Service Locator (服务定位) ``` //简单粗暴的代码, 使用声音系统 // Use a static class? Au ...

  10. hihocoder 1049 后序遍历树

    #include<cstdio> #include<cstdlib> #include<iostream> #include<cstring> #inc ...