dimanche 8 avril 2018

c++11 random library compilation for 32 bit processor on 64 bit environment

I have a project and I have to use <random> library here. Now I need to compile it for 32 bit processor, but I am getting this error:

mingw/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/bits/random.h:107:26: error: expected unqualified-id before '__int128'
   { typedef unsigned __int128 type; };
                      ^~~~~~~~

Looks like 32-bit compiler doesn't like __int128 much. Is there any way to fix it?

I am using mingw w64 and compiling for windows.
Also using CMake. To compile my project for 32 bit processor I've added this line:

set(CMAKE_CXX_FLAGS -m32)

EDIT: When compiling for 64 bits everything works fine.




Aucun commentaire:

Enregistrer un commentaire