u/RiderRockon - 4 Archived Voat Posts in v/programming
u/RiderRockon
  • home
  • search

u/RiderRockon

1 post · 3 comments · 4 total

Active in: v/programming (4)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››
Comment on: C/C++ and large file sizes (over 2GB)

Yes! That seems to work for me as well! Thank you!

That seems a rather oddly specific way to do it though.

1 10 Jul 2015 13:47 u/RiderRockon in v/programming
Comment on: C/C++ and large file sizes (over 2GB)

After a bit of digging I think I might be doing something wrong with the compiler flag, as sizeof( off_t ) still returns 4. Here's what I use to compile the project.

gcc -c src/cryption.cpp -I include -L lib -D_FILE_OFFSET_BITS=64
gcc -c src/main.cpp -I include -L lib -D_FILE_OFFSET_BITS=64
echo ----------------
g++ -o cryption main.o cryption.o -I include -L lib -D_FILE_OFFSET_BITS=64
0 10 Jul 2015 10:34 u/RiderRockon in v/programming
Comment on: C/C++ and large file sizes (over 2GB)

I gave that a shot. However when I run this on a large file it returns -1. I'm using MinGW on Windows for this, but that shouldn't matter, should it?

0 10 Jul 2015 09:32 u/RiderRockon in v/programming
C/C++ and large file sizes (over 2GB)
1 6 comments 09 Jul 2015 23:59 u/RiderRockon (self.programming) in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.