RH7.2 2.4.X off_t: long or long long?
Anton Graph
"aglyportat\" at n-o.spa__mmm.yahoo dott com>
Sat Jun 15 22:40:43 EDT 2002
Anton Graph wrote:
> I have an odd problem trying to link my app:
>
> glog.o(.text+0x100a): undefined reference to `loadfile(char const *,
> long long *)'
> collect2: ld returned 1 exit status
>
>
> in loadfile.C:
>
> char *
> loadfile(const char *path, off_t *length)
> {
> ...
>
> and the declaration in the header is:
>
> char *loadfile(const char *path, off_t *size=0);
>
> nm -C libgen.a |grep loadfil
> U loadfile(char const *, long *)
> loadfile.o:
> 00000000 T loadfile(char const *, long *)
> U loadfile(char const *, long long *)
>
> Why are there two references differing in the last arg? Is off_t
> supposed to be long or long long?
>
> Thank you!
>
Nevermind, this had something to do with Python.h that I've included.
Removed the inclusion of Python.h and everything works fine.
For some odd reason
/* The number of bytes in an off_t. */
#define SIZEOF_OFF_T 8
is defined in pyconfig.h which is used by Python.h but oddly there is no
redefinition of off_t anywhere in Python files. Kinda puzzling.
More information about the Python-list
mailing list