Thread overview | ||||||
---|---|---|---|---|---|---|
|
November 04, 2004 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 |
November 04, 2004 Re: Undefined symbols: __lseeki64 & __telli64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brian Gardner | 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 > > |
November 04, 2004 Re: Undefined symbols: __lseeki64 & __telli64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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 42) > > for the following code: |
November 05, 2004 Re: Undefined symbols: __lseeki64 & __telli64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brian Gardner | 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 > 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 > 42) > > > for the following code: > > |
Copyright © 1999-2021 by the D Language Foundation