Produce your own sharing library:
a.c
#include
Void PLN (Char * STR)
{
Printf ("% S / N", STR);
}
gcc -shared -fpic a.c -o libmy.so
-shared
Compile to create a shared library.
-fpic
Do some optimization when compiling shared libraries.
B.C
Extern Viod Pln (char *)
Main ()
{
PLN ("Hello World");
}
GCC B.c -Lmy
Note: By default, GCC is only looking for libraries only in the directory specified in /etc/ld.so.conf. (This should be added to the road)
-IDIR
It is also looking for header files under DIR.
-Ldir
Logo files are also logged under DIR.