Chapter 5 173
Creating and Using Libraries
Caution When Mixing Shared and Archive Libraries
Figure 5-21
When you run a.out, it runs correctly. Now suppose you need to modify
f3() to call f2():
Figure 5-22
Compile the new f3() and rebuild the shared library lib3.sl,
including the new dependency on f2() in lib12.sl:
$ cc -c +z f3.c Compile to PIC.
$ ld -b -o lib3.sl f3.o -L . -l12 Create library with dependency.