2GB limit on file size when using fwrite in C?

On a 32 bits system (i.e. the OS is 32 bits), by default, fopen and co are limited to 32 bits size/offset/etc… You need to enable the large file support, or use the *64 bits option:


Then your fs needs to support this, but except fat and other primitive fs, all of them support creating files > 2 gb.

Leave a Comment