Thread overview
Undefined symbols: __lseeki64 & __telli64
Nov 04, 2004
Brian Gardner
Nov 04, 2004
Walter
Nov 04, 2004
Brian Gardner
Nov 05, 2004
Walter
November 04, 2004
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
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
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
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:
>
>