Thursday, May 17, 2012

Compile Error: relocation truncated to fit: R_X86_64_PC32

If you get this error do the following:

The error normally occurs when compiling a code whose static data structures exceed 2G in size. If your code requires static data structures in excess of 2G, the code must be recompiled and linked using the medium memory controller model. The flag -mcmodel=medium must be added to all compiler and linker commands.


Original Source: 

Link!