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. nova Scheduling 配置

    Nova中调度配置: scheduler_driver_task_period = scheduler_driver = nova.scheduler.filter_scheduler.FilterS ...

  2. 英语发音规则---U字母-[复习中]

    英语发音规则---U字母 一.总结 一句话总结:(注:本文所有//的音标为英音音标,[]的音标为美音音标) 1.U在开音节中发[ju ]/ ju: /? duty /'djuːtɪ/ ['dʊti] ...

  3. 如何创建效率高sql-建立索引

      我们做开发的人员,虽说自己不是专业从事数据库方面研究的(如DBA),但很多时候,公司没有专门的DBA,所以拿到具体的项目中,整体的数据库设计都是开发人员自己写的,随着时间的推移,加上开发经验的增长 ...

  4. java:OutputStream和InputStream 输出输入流,FileOutputStream,FileInputStream写入读取流

    1.在java中stream代表一种数据流(源),javaio的底层数据元,---(想像成水龙头)2.任何有能力产生数据流(源)的javaio对象就可以看作是一个InputStream对象既然它能产生 ...

  5. android横屏布局文件设置

    一.AndroidManifest.xml配置 1.在AndroidManifest.xml的activity(需要禁止转向的activity)配置中加入   android:screenOrient ...

  6. eclipse部署和启动guns

    eclipse部署guns: 1.import -> 搜索maven -> Existing Maven Projects -> 选择guns根目录 2.修改配置文件: spring ...

  7. java调接口

    package util; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.InputSt ...

  8. Chrome Adobe flash player已过期怎么办

    越来越多的朋友感受到了来自谷歌chrome新版浏览器的压力,因为有不少朋友在使用新版chrome浏览器看视频时,却出现了这样的提示:Adobe flash player已过期!怎么办啊? 有网友抱怨: ...

  9. hdoj-3791-二叉搜索树(二叉搜索树模板题)

    #include <cstring> #include <cstdio> #include <iostream> using namespace std; type ...

  10. C# WebApi 配置复杂路由不生效的问题

    配置复杂路由不生效是由于优先级的关系,应该把默认路由放在最后. config.Routes.MapHttpRoute( name: "DynamicApi", routeTempl ...