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