This project fills the absence of stdint.h and inttypes.h in Microsoft Visual Studio
2013-01-23 14:03
1456 查看
http://code.google.com/p/msinttypes/
FFMpeg is a good example of library that requires inttypes.h even if you just want to link your program with it.
More portable version of stdint.h can be find here but it does not implement inttypes.h features, such as printf and scanf format specifiers.
C99中添加了几个新的头文件,VC++中没有,所以需要你自己下载
判断支持C98 或者 C99 代码
View Code
http://blog.csdn.net/rodmanwu/article/details/6846788
stdint.h是C99的标准,主要用于统一跨平台数据定义。
MSVC中不带有这个头文件,直到VS2010(新闻)。
在之前的版本里面,我们可以:
(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
(以VS2011为例): D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include 需要 inttypes.h
msinttypes
This project fills the absence of stdint.h and inttypes.h in Microsoft Visual Studio. This files were standartized by ISO/IEC as a part of C99standard library. If you want to compile or use C99 compliant project with Microsoft Visual Studio, you will likely find that you're missing these headers. Note though, that just adding these header does not make Visual Studio compiler fully C99 compliant.FFMpeg is a good example of library that requires inttypes.h even if you just want to link your program with it.
More portable version of stdint.h can be find here but it does not implement inttypes.h features, such as printf and scanf format specifiers.
C99中添加了几个新的头文件,VC++中没有,所以需要你自己下载
判断支持C98 或者 C99 代码
View Code
#include<stdio.h> #include<tchar.h> //int main() //int _tmain(int argc, _TCHAR* argv[]) int _tmain() { #if (defined(__STDC_VERSION__)) printf("标准C版本:%ld。", __STDC_VERSION__); #elif (!defined(__STDC__)) printf("非标准C!"); #else printf("旧的标准C。"); #endif getchar(); return 0; }
http://blog.csdn.net/rodmanwu/article/details/6846788
stdint.h是C99的标准,主要用于统一跨平台数据定义。
MSVC中不带有这个头文件,直到VS2010(新闻)。
在之前的版本里面,我们可以:
(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
(以VS2011为例): D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include 需要 inttypes.h
相关文章推荐
- Shortcut Collapse project or projects in the Solution Explorer Microsoft Visual Studio 2008
- 解决VS2010打开项目时“This project is incompatible with the current version of Visual Studio”
- The article discusses a couple of new features introduced for assemblies and versioning in Visual Studio 2005.
- HOWTO: Get the project flavor (subtype) of a Visual Studio project from an add-in
- This project is incompatible with the current version of Visual Studio
- Microsoft Visual Studio cannot shut down because a modal dialog is active. Close the active dialog and try again.
- WindowsCE project missing Microsoft.CompactFramework.CSharp.targets in Visual Studio 2008
- VS代码段扩展Snippet Designer is a Visual Studio plug in which allows you to create and search for snippets inside the IDE
- Microsoft Visual Studio 2010 and the .NET Framework 4.0 CTP下载
- How to: Modify a Project System So That Projects Load in Multiple Versions of Visual Studio
- Qt Visual Studio Add-in: Creating Qt Translation Files for the Project
- This list contains all of the known Microsoft Knowledge Base articles, howtos, fixes, hotfixes, webcasts and updates of Microsof
- How to: Specify the Web Server for Web Projects in Visual Studio
- Odd elements at odd and even elements at even positionThis is question asked in one of the interview
- Error in Microsoft Visual Studio 2012 :No exports were found that match the constraint
- Using UTF-8 as the internal representation for strings in C and C++ with Visual Studio
- Project was skipped when rebuild the solution in Visual studio
- This version of Visual Studio .NET does not support source controlled projects. Any changes that you make to this project will n
- A class file was not written. The project may be inconsistent, if so try refreshing this project and building it. eclipse提示错误
- Creating Spreadsheets and Charts in Microsoft Office Excel 2007 for Windows: Visual QuickProject Gui