October 2000
Intermediate to advanced
432 pages
9h 9m
English
Libraries often rely on code in other libraries. Traditionally the way to deal with this is to know what the dependencies are and, when linking an executable, be careful to list all the dependencies on the link line in the correct order. If you have ever built an X Window application using a widget library, you are already familiar with this notion.
Even though you use only the functions in the widget library directly, a typical link command needs to be as follows:
$ gcc -o Xtest -I/usr/X11R6/include Xtest.c -L/usr/X11R6/lib \ -lXm -lXp -lXaw -lXmu -lX11 -lnsl -lsocket
Modern architectures have solved this problem by allowing libraries to be linked into other libraries, but this feature is not yet particularly portable. ...
Read now
Unlock full access