VS2008下编译C++程序,找不到 stdint.h,原因及解决方案


在 VS2008 下编译c++程序,发现找不到 stdint.h, 最后证实原因如下红字,解决方案是改用符合C99标准的编译器(如VS2010),或自定义头文件:

 

#ifdef _MSC_VER  
typedef __int32 int32_t; 
typedef unsigned __int32 uint32_t; 
typedef __int64 int64_t; 
typedef unsigned __int64 uint64_t;  
#else 
#include <stdint.h> 
#endif 

  

Visual Studio 2003 - 2008 (Visual C++ 7.1 - 9) don't claim to be C99 compatible

 

另注:在VS2010下,stdint.h 的位置在 C:\Program Files\Microsoft Visual Studio 10.0\VC\include


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM