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!