【发布时间】:2012-10-27 08:10:35
【问题描述】:
在带有 Visual Studio 2010 的 Windows 中使用 ffMPEG 构建时,我遇到了 inttypes.h not found 错误。
由于通过互联网搜索导致我找到错误的解决方案,我想我会在这里提出正确的解决方案,以便人们可以轻松找到它。很快就会回答我自己的问题。
【问题讨论】:
标签: visual-studio-2010 visual-c++ ffmpeg
在带有 Visual Studio 2010 的 Windows 中使用 ffMPEG 构建时,我遇到了 inttypes.h not found 错误。
由于通过互联网搜索导致我找到错误的解决方案,我想我会在这里提出正确的解决方案,以便人们可以轻松找到它。很快就会回答我自己的问题。
【问题讨论】:
标签: visual-studio-2010 visual-c++ ffmpeg
解决方案是下载this file 并将inttypes.h 文件放在Visual Studio 可以找到它的地方,或者放在ffMPEG 的common.h 所在的文件夹中。如果选择后者,则必须将 #include<inttypes.h> 行更改为 #include "inttypes.h"。
从here 得到了这个解决方案。
另一个对我不起作用的解决方案是将 #include<inttypes.h> 替换为
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;
typedef signed long long int64_t;
typedef unsigned long long uint64_t;
此解决方案来自here。
希望这会有所帮助。
【讨论】:
#include "libavutil/inttypes.d"。
#ifndef HAS_INT_TYPES
#ifdef HAS_C99
#include <stdint.h>
#endif
#endif
【讨论】: