__int128 error when compiling 32 bit

前端 未结 1 1120
北荒
北荒 2021-01-05 09:50
c:\\...random.h|106|error: expected unqualified-id before \'__int128\'

When I\'m compiling a 32 bit program, the above is the error I get. I\'m usi

相关标签:
1条回答
  • 2021-01-05 10:22

    __int128 is protected by

    !defined(STRICT_ANSI) && defined(_GLIBCXX_USE_INT128)

    So, you could either use -ansi (in case your code is strictly ansi c++ complaint), I faced errors in linker due to the fact that the linker unable to find the 32bit libs.

    _GLIBCXX_USE_INT128

    is defined in "lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/x86_64-w64-mingw32/bits/c++config.h" which I am pretty sure was generated by the autoconfigure based on the system the tool chains are built.

    You better download the 32bit version on mingw gcc (binary) package and install them too.

    0 讨论(0)
提交回复
热议问题