4

I'm working on porting my code over to Mac which compiles fine on my 64bit Windows machine. Apparently one of the libraries I am utilizing (Awesomium) isn't compiled to 64bit code, so I have to compile my code as a 32bit binary.

I'm getting an error when trying to compile 32bit binary with GCC 4.8.

In file included from /opt/local/include/gcc48/c++/random:50:0,
                 from /opt/local/include/gcc48/c++/bits/stl_algo.h:67,
                 from /opt/local/include/gcc48/c++/algorithm:63,
                 from /Library/Frameworks/SFML.framework/Headers/System/Utf.hpp:32,
                 from /Library/Frameworks/SFML.framework/Headers/System.hpp:43,
                 from /Library/Frameworks/SFML.framework/Headers/Window.hpp:32,
                 from /Users/ryan/projects/ArchaicEngine/ArchaicEngine/includes/ArchaicEngine/Graphics/RenderWindow.h:4,
                 from /Users/ryan/projects/ArchaicEngine/ArchaicEngine/src/Graphics/RenderWindow.cpp:1:
/opt/local/include/gcc48/c++/bits/random.h:106:26: error: expected unqualified-id before '__int128'
       { typedef unsigned __int128 type; };

Basically SFML includes <algorithm> which then includes <random> which uses __int128 which is unavailable to 32bit binaries. How can I get this to compile?

rcapote
  • 1,034
  • 7
  • 19
  • GCC's official statement on support is, basically, roll your own: http://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html – Joe Oct 30 '12 at 22:35
  • Other solutions involve using some kind of bigint library... see http://stackoverflow.com/questions/1188939/representing-128-bit-numbers-in-c – Joe Oct 30 '12 at 22:36
  • Of course, you could also try to get Awesomium to build under 64-bit. – Joe Oct 30 '12 at 22:36
  • Ah okay. Looking back now, I was using 32bit SFML library ton windows. I'll just have to link to 32bit SFML on the mac and it should work. – rcapote Oct 30 '12 at 23:15
  • A possible answer present at: [__int128 error when compiling 32 bit](http://stackoverflow.com/questions/15725167/int128-error-when-compiling-32-bit) – Mayank Parasar Apr 19 '16 at 23:30

0 Answers0