Objective-C PostgreSQL stuff:
gcc -dynamiclib -install_name /usr/local/lib/libfoo.2.dylib -compatibility_version 2.4 -current_version 2.4.5 -o libfoo.2.4.5.dylib source.o code.o
I have also seen the options -undefined suppress -flat_namespace here
Another dylib link
Caution mixing shared and archive libs
Seth Godin - how to run a useless conference