set install_name for dylib
g++ -install_name xxx.o -o xxx.dylib
view install_name:
method1: otool -L xxx.dylib see the first row.
change install_name
install_name_tool -change old.dylib new.dylib xxx.dylib
pack libs
lipo -create a_32.dylib a_64.dylib -output a.dylib