vc编译ffmpeg遇到问题(inttypes.h和UINT64_C问题)

来源:互联网 发布:linux io重定向 编辑:程序博客网 时间:2024/06/08 12:14


vc编译ffmpeg问题集

解决:Cannot open include file:\’inttypes.h\’
更新ffmpeg之后,有时编译应用ffmpeg库的工程会发现提示:Cannot open include file:\’inttypes.h\’:No such file or directory的出错信息,可通过如下方法解决:
1、找到include目录中的ffmpeg\\common.h 2、在#define COMMON_H之后加入如下代码,同时删除#include inttypes.h然后保存:
#if defined!defined!defined
#define CONFIG_WIN32
#endif
#if defined!defined!defined!defined
#define EMULATE_INTTYPES
#endif
#ifndef EMULATE_INTTYPES
#include inttypes.h
#else typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#ifdef CONFIG_WIN32 typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else/other OS/
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
#endif/other OS/
#endif/EMULATE_INTTYPES/
解决error C3861:\’UINT64_C\’:identifier not found
#ifndef INT64_C
#define INT64_C
#define UINT64_C
#endif
作者:网络小虫发表于2010-12-03 00:20原文链接