ffmpeg: 'UINT64_C' was not declared in this scope

news/2024/7/10 20:16:01 标签: ffmpeg

ffmpeg 是使用C语言写的,默认使用C编译,如果要在C++中调用ffmpeg,则有可能出现错误:

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>
}

来源: http://blog.csdn.net/kidleaf2/article/details/7733284



http://www.niftyadmin.cn/n/1456340.html

相关文章

【转】How to use LINQ methods to compare objects of custom types

原文&#xff1a;http://blogs.msdn.com/csharpfaq/archive/2009/03/25/how-to-use-linq-methods-to-compare-objects-of-custom-types.aspx 译文&#xff1a;http://www.cnblogs.com/tianfan/ LINQ provides a convenient syntax and many useful methods for operating with …

error: expected ‘)’ before ‘PRId64’

error: expected ‘)’ before ‘PRId64’ 原来这个宏定义给c用的&#xff0c;C要用它&#xff0c;就要定义一个__STDC_FORMAT_MACROS宏显示打开它。 c使用PRID64&#xff0c;需要两步&#xff1a; 包含头文件&#xff1a;<inttypes.h>定义宏&#xff1a;__STDC_FORMAT_…

POI中getLastRowNum() 和getLastCellNum()的区别

hssfSheet.getLastRowNum();//最后一行行标&#xff0c;比行数小1 hssfSheet.getRow(k).getLastCellNum();//获取列数&#xff0c;比最后一列列标大1

SQL server入门-3,T-SQL编程

>[1]局部变量 declare name varchar(8)-----name为变量名&#xff0c;varchar为数据类型 局部变量赋值&#xff1a; 1. set name value2. select name value declare name varchar(8)set name 李文才select * from stuinfo where stuname namedeclare seat intset seat …

服务器机房维护管理着眼三方面

服务器的日常维护的重要性自不必多说&#xff0c;机房管理是一种具有很强的专业性和很烦琐的工作。总结机房管理的经验&#xff0c;目的就是为了提高工作效率&#xff0c;更好地完成工作&#xff0c;为教学提供良好的后勤保障。(一)软件维护篇一、系统修复使用“系统文件检查器…

error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“0”不匹配值“2

解决办法 1、可能是release模式下引用了debug模式下生成的库&#xff0c;所以工程的模式和库的模式要保持一致 2、可能是库的编译选项和工程的编译选项不同&#xff0c;例如都使用相同的运行模式&#xff08;属性--->C/C------>代码生成&#xff09;即多线程调试MTD

如何判断一条sql(update,delete)语句是否执行成功

如何判断一条sql(update,delete)语句是否执行成功 catch (SQLException e) { } catch不到错误应该就成功了。 Statement对象提供了三种执行sql语句的方法。 1.ResultSet executeQuery(String sql) 执行查询语句&#xff0c;如ResultSet rsstmt.executeQuery(se…

将Linux上的配置库远程备份到windows上(自己实践的)

svn服务器部署在Linux操作系统上(IP:192.168.2.6)&#xff0c;我将备份文件备份到本地d盘&#xff08;windows&#xff09;操作系统(IP:192.168.3.86)。 服务器上的工程项目存放在CYMS目录下&#xff0c;计划备份到本机的d:\beifen\CYMS文件夹下。 1、运行-->cmd,进入命令提…