|
If this is production code, don't link against your own directory tree. Terrible idea. Instead compile your shared library into a archive (.a). Link statically against the .a file.
cc myprogram.c /myhome/lib.libwhatever.a -o myprogram
The executable image will then run pretty much anywhere, on any system that supports the archictecture on your development system - and that has the same libc The downside is that the app will use more memory.
|