I'm trying to compile a c program under mingw gcc. This program is using an __uint128_t
integer. When I try to compile it under the standard ubuntu gcc on the same 64-bit machine, it perfectly works. But then, when I try to compile it for windows under mingw, it simply doesn't even recognize the __uint128_t
keyword. What does this mean? There aren't 128 bit integers under mingw?
If not, is there any programming language for windows which has native (and FAST) 128 bit integers?
You need
__int128_t
is then emulated by using pairs of int64_t
in the same way as 64bit integers are emulated with 32bit if they are not available on 32bit compiles
I was able to get the same problem using Code::Blocks and the default mingw install (which is IA32 btw), however, when I installed TDM-MinGW64, it compiled fine (after adding the x64 compiler to C::B). So make sure your mingw build is targeting x64 (with -m64
) and it is an x64 build of mingw, as __uint128_t
is an optional x64 ABI extension.
whatever windows IDE you are using won't pick up __int128_t
as a keyword though, as its a special GCC extension (as mentioned).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With