Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++ - Undefined symbols: __lseeki64 & __telli64
Why OPTLINK reports undefined symbols __lseeki64 and __telli64 (Error 42) for the following code: #include <io.h> #include <fcntl.h> #include <sys\stat.h> #include <stdio.h> int main(void){ int output = _open("temp", _O_BINARY | _O_WRONLY | _O_CREAT | _O_TRUNC, _S_IREAD | _S_IWRITE); long x = 97; _write(output, &x, sizeof(x)); printf("%lld\n", _telli64(output)); _lseeki64(output, 0, SEEK_SET); return _close(output);} Thanks, Brian Nov 04 2004
Because those two symbols are not part of the runtime library. Just use lseek() and tell() instead. "Brian Gardner" <briangr friberg.us> wrote in message news:cmdpul$21am$1 digitaldaemon.com...Why OPTLINK reports undefined symbols __lseeki64 and __telli64 (Error 42) for the following code: #include <io.h> #include <fcntl.h> #include <sys\stat.h> #include <stdio.h> int main(void){ int output = _open("temp", _O_BINARY | _O_WRONLY | _O_CREAT | _O_TRUNC, _S_IREAD | _S_IWRITE); long x = 97; _write(output, &x, sizeof(x)); printf("%lld\n", _telli64(output)); _lseeki64(output, 0, SEEK_SET); return _close(output);} Thanks, Brian Nov 04 2004
I can't use _lseek and _tell, because I need fast r/w access to files > 2GB. Can you offer me more conveniently solution than to use _lseeki64 & _telli64 with mingw gcc? Thank you, Brian "Walter" <newshound digitalmars.com> wrote in message news:cme3hd$2fli$1 digitaldaemon.com...Because those two symbols are not part of the runtime library. Just use lseek() and tell() instead. "Brian Gardner" <briangr friberg.us> wrote in message news:cmdpul$21am$1 digitaldaemon.com...Why OPTLINK reports undefined symbols __lseeki64 and __telli64 (Error Nov 04 2004
You can access the Win32 file API directly, which are ReadFile(), and WriteFile(). "Brian Gardner" <briangr friberg.us> wrote in message news:cme71n$2kk1$1 digitaldaemon.com...I can't use _lseek and _tell, because I need fast r/w access to files > Nov 04 2004
|