How can I get gcc to write a file larger than 2.0 GB?

Posted by fred.bear on Ask Ubuntu See other posts from Ask Ubuntu or by fred.bear
Published on 2011-01-14T08:36:02Z Indexed on 2011/01/14 8:58 UTC
Read the original article Hit count: 224

Filed under:
|

I wanted to recompile 'xxd' (written in C), so I installed CodeBlocks as the IDE.

All seemed to go well unil I discovered that I couldn't write past the 2.0 GB barrier...

I've read that 'gcc' needs to be recompiled... (That sounds a bit dramatic..)
I've read that I can use 'fread64()' instead of 'fread()' ... (didn't work)
I've read something about a compiler options (?)... but I get lost at that point?

I am surprised that it didn't work out-of-the-box, as I thought the 2.0 GB limit was ancient history as far as defaults go ... wrong again?:(

My OS is 32-bit, on 32-bit hardware.
The gcc version report in as: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

Is there a simple way around this issue?

PS.. I was fascinated by the WARNINGS: section of 'info xxd' (..only on Linux ;)

© Ask Ubuntu or respective owner

Related posts about compile

Related posts about gcc