C++ Builder 2007: Unresolved external ‘__fseeki64’
Question:
I work with C++ Builder
There are no problems with chilkatLib in IDE version XE8 but I still have some code in C++ Builder 2007
Is it possible to solve this case somehow:
[ilink32 Error] Error: Unresolved external ‘__fseeki64’ referenced from LIB-WIN32\CHILKAT_CLASSIC_WIN32.LIB|ChilkatHandle ?
Answer:
The Chilkat static library for C++ Builder not intended for C++ Builder 2007, so it’s not possible to make a change in the library to resolve this problem.
However.. you can add this function yourself. If you know the files you’ll be working with are less than 4GB in size,then the 32-bit “fseek” function should be sufficient. You can try this:
extern "C" { int _fseeki64( FILE *stream, __int64 offset, int origin ) { return fseek(stream,(long)offset,origin); } }
If you wish to check if a 64-bit integer is too large for 32-bits, you can do this:
bool tooBigForUnsigned32(__int64 x) { __int64 hi = (x >> 32) & 0xFFFFFFFF; if (hi) return true; return false; }
admin
0
Tags :