'uint32_t' identifier not found error

后端 未结 7 1812
情话喂你
情话喂你 2020-12-07 23:41

I\'m porting code from Linux C to Visual C++ for windows.

Visual C++ doesn\'t know #include so I commented it out.

Later, I fou

7条回答
  •  醉梦人生
    2020-12-08 00:25

    This type is defined in the C header which is part of the C++11 standard but not standard in C++03. According to the Wikipedia page on the header, it hasn't shipped with Visual Studio until VS2010.

    In the meantime, you could probably fake up your own version of the header by adding typedefs 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. ... */
    

    Hope this helps!

提交回复
热议问题