site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com if i do something like this : gcc \ -dynamiclib \ -undefined suppress \ -flat_namespace \ -single_module \ -all_load ./libMy.a \ -install_name /usr/local/lib/libMy.1.dylib \ -compatibility_version 1 -current_version 1.3 -o libMy.1.0.dylib \ -lz because the "normal" way is gcc -dynamiclib *.pic.o \ -install_name /usr/local/lib/libMy.1.dylib \ -compatibility_version 1 -current_version 1.3 -o libMy.1.0.dylib \ -lz and ar rc libMy.a *.non-pic.o GCC 2.95.2 gcc -c -fPIC myfile.c gcc -shared -o libmyfile.so -fPIC myfile.o gcc3 gcc2 gcc4 ? and -fPIC this has an importance under Linux but for a mach-o archive ? this case can be found ? prelink: /usr/bin/mybin: Cannot prelink against non-PIC shared library /usr/lib/libMy.dylib gcc -dynamiclib *.pic.o \ -install_name /usr/local/lib/ libMyOther.1.dylib \ -compatibility_version 1 -current_version 1.3 -o libMyOther.1.0.dylib \ -lz ./libMy.a Best Regards, {Plum} _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... i have an another question about pic or non pic objects stored inside a library archive 1 - is there an importance that stored objects have been built with the pic or non-pic option ? 2 - is it normal that the lib archive has a bigger size than the shared archive ( +15% ) ? When building a shared library, gcc will compile additional code to be included in the library. That additional code must also be compiled with the proper PIC option. http://developer.apple.com/releasenotes/DeveloperTools/GCC4.html 3 - is there an importance that stored objects have been built with the pic option in a library archive ? This email sent to site_archiver@lists.apple.com