Problem
I am compiling a program that calls the system library routines fattach(S), usleep(S) and expm1(S), and I have specified the correct libraries to link according to the manual page for these library routine calls.
However, the compilation fails with an "undefined symbol" error message for these routines, such as:
$ cc myprog.c -lc -lm
undefined first referenced
symbol in file
fattach myprog.o
usleep myprog.o
expm1 myprog.o
ld fatal: Symbol referencing errors. No output written to a.out Solution
These library calls are defined as part of the X/Open Compatibility Guide Issue 4, Version 2 (XPG4.2), also known as "Spec-1170" or the X/Open "Single Unix Specification".
Currently, the SCO OpenServer Development System Release 5.0.0 fully conforms to the previous version of XPG4, and but not to Version 2.
Although documented, the library routines fattach(S), usleep(S) and expm1(S) are not currently included in any of the development libraries for SCO OpenServer Release 5.0.0.
The following Spec-1170 routines are not included in this product, but are declared in various system header files:
setjmp.h:
_longjmp()
_setjmp()math.h:
expm1()
log1p()unistd.h:
fattach() (also declared in stropts.h)
gethostid()
ualarm()
usleep()ucontext.h:
makecontext()
swapcontext()stdlib.h:
mkstemp()These library routines are intended to be included in a future release of SCO OpenServer.