What is OSX, C equivalent for uint32 and uint64?

I think this is a question that has been asked a thousand times, but I cannot find a direct answer.

I am trying to port a very short C function (originally written for Windows) to OSX using Xcode.

I created an Xcode application project, Terminal, and I copied and pasted the code into the project. XCode gives me a lot of mistakes, telling me that the types uint32and uint64are unknown types.

What are the equivalent value types in OSX?

+5
source share
4 answers

You can use uint32_tand uint64_tby importing stdint.h.

+14
source

, , POSIX C. , Mac OSX, Linux, Solaris .. uint8_t uint64_t. int8_t uint8_t.

+3

uint32_tand uint64_t- both are defined stdint.hin accordance with definition C99.

Others are Microsoft's proprietary solution.

+2
source

Try these ;-) UInt32 lala; UInt64 lolo;

Wrong question. If you create a project for terminals only, you will not bind Cocoa / Foundation and Carbon. Inside the last UInt16 / 32/64 typedef'ed.

0
source

All Articles