总结windows获取stdint.h和inttypes.h方法

stdint.h是C99的标准,主要用于统一跨平台数据定义。

MSVC中不带有这个头文件。


从网上下载x264源码,解压后从extras文件夹直接赋值需要的这两个文件;

注意:今天20151019我从中获取后,在VC2010中编译201505月的ffmpeg函数,出现了部分定义冲突错误,冲突错误显示到,

“D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdint.h”,也就是说,VC2010有stdint.h,虽然和x264不太一样,但是肯定也可以用;所以,最新的在VC2010上,只需要inttypes.h就可以了,同时修改文件中的#include“stdint.h” 为,#include<stdint.h>

或者屏蔽stdint.h中的冲突项; 


或者


从网上下载 “FFmpeg-full-SDK-3.2”, 这个资源比较多,

解压后,从里面找到:inttypes.h 和 stdint.h



或者


fatal error C1083: 无法打开包括文件:“stdint.h”: No such file or directory

copy C:/MSYS/include下的stdint.h到libavutil中。修改#include<stdint.h>#include“stdint.h”


或者


在之前的版本里面,我们可以:

(1)下载这个头文件

download a MS version of this header from:

http://msinttypes.googlecode.com/svn/trunk/stdint.h

A portable one can be found here:

http://www.azillionmonkeys.com/qed/pstdint.h

(2)将头文件放到(以VS2008为例):

C:\Program Files\Microsoft Visual Studio 9.0\VC\include



或者参考:

ffmpeg\doc\platform.html\Microsoft Visual C++ or Intel C++ Compiler for Windows;

找到 msinttypes (if using MSVC 2012 or earlier)链接;


fatal error C1083: 无法打开包括文件:“stdint.h”: No such file or directory

copy C:/MSYS/include下的stdint.h到libavutil中。修改#include<stdint.h>#include“stdint.h”

你可能感兴趣的:(总结windows获取stdint.h和inttypes.h方法)