xdrfile library does not open large files (>2Gb) if used from C++
If xdrfile library is used from C++ project (by directly including xdrfile.h and linking statically) it can't handle large file (> 2Gb).
The problem is that the flag D_FILE_OFFSET_BITS=64 should be passed to compiler explicitly to enable large files in fopen call, but it is not needed for "normal" std file handling routines in C++ (thus not used). As a result the code refuses to work "mysteriously" for large files.
#define _FILE_OFFSET_BITS 64