没有找到“uint32_t的”标识符错误 [英] 'uint32_t' identifier not found error
问题描述
我移植code从Linux下C到Visual C ++的Windows。
I'm porting code from Linux C to Visual C++ for windows.
的Visual C ++不知道的#include< stdint.h方式>
所以我评论它
Visual C++ doesn't know #include <stdint.h>
so I commented it out.
后来,我发现了很多的uint32_t的'的:标识符没有找到
错误。怎样才可以解决呢?
Later, I found a lot of those 'uint32_t': identifier not found
errors. How can it be solved?
推荐答案
这个类型在C头文件中定义&LT; stdint.h&GT;
这是不是目前的一部分的C ++标准。据的头的维基百科页面,但并没有与Visual Studio运到VS2010。
This type is defined in the C header <stdint.h>
which is not currently a part of the C++ standard. According to the Wikipedia page on the header, it hasn't shipped with Visual Studio until VS2010.
在此期间,你很可能伪造了自己版本的头的加入的typedef
S中的地图的微软定制的整数类型来,由C.预期例如类型:
In the meantime, you could probably fake up your own version of the header by adding typedef
s that map Microsoft's custom integer types to the types expected by C. For example:
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
/* ... etc. ... */
希望这有助于!
这篇关于没有找到“uint32_t的”标识符错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!