Re: [AOLSERVER] Static vs. shared libraries?

2001-10-26 Thread Andrew Piskorski
On Thu, Oct 25, 2001 at 06:55:50PM -0500, Rob Mayoff wrote: On Linux, you should be able to extract all the .o files from the .a and combine them into a .so. Rob, how would I do that? Can you point me to any info? -- Andrew Piskorski [EMAIL PROTECTED] http://www.piskorski.com

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-26 Thread Jim Wilcoxson
ar -x blah.a On Thu, Oct 25, 2001 at 06:55:50PM -0500, Rob Mayoff wrote: On Linux, you should be able to extract all the .o files from the .a and combine them into a .so. Rob, how would I do that? Can you point me to any info? -- Andrew Piskorski [EMAIL PROTECTED]

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-26 Thread Rob Mayoff
+-- On Oct 26, Jim Wilcoxson said: ar -x blah.a Followed by ld -shared -nostartfiles -o blah.so *.o (If you're using GNU ld, anyway.)

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-26 Thread Andrew Piskorski
On Thu, Oct 25, 2001 at 09:46:06PM -0400, Dossy wrote: On 2001.10.25, Andrew Piskorski [EMAIL PROTECTED] wrote: Unfortunately, the vendor of this closed-source API ships only the non-shared libfoo.a version of their library - they don't ship a libfoo.so. So, just make a libfoo.so that

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-26 Thread Andrew Piskorski
Ah, outstanding! By doing: $ ar -x libfoo.a $ ld -d y -G -o libfoo.so *.o -L/home/foo/lib -lblah1 -lblah2 $ gcc -shared -fPIC -I../aolserver/include -g -Wall -o myfoo.so myfoo.c /home/foo/lib/libfoo.so I was able to take apart the vendor's .a file, put it back together as a libfoo.so,

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-26 Thread Rob Mayoff
+-- On Oct 26, Andrew Piskorski said: Rob, why did you want to use -nostartfiles ? Because AOLserver uses that on Linux. See LDSO in Makefile.global.

[AOLSERVER] Static vs. shared libraries?

2001-10-25 Thread Andrew Piskorski
I have a newbie's C module development question: I have a closed-source C API that I want to use from AOLserver. Ok, no problem, creating a myfoo.so AOLserver loadable module to do that should be straightforward. Unfortunately, the vendor of this closed-source API ships only the non-shared

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-25 Thread Jim Wilcoxson
I think you can just say ld -o blah.so -shared blah.a without extracting .o files. The tricky part is going to be ensuring that the files were compiled with the -D_REENTRANT flag on Linux. Otherwise, the code won't work in weird cases (like referencing errno). Jim On Linux, you should be

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-25 Thread Andrew Piskorski
On Thu, Oct 25, 2001 at 05:10:45PM -0700, Jim Wilcoxson wrote: I think you can just say ld -o blah.so -shared blah.a without extracting .o files. The tricky part is going to be ensuring that the files were compiled with the -D_REENTRANT flag on Linux. Otherwise, the code won't work in

Re: [AOLSERVER] Static vs. shared libraries?

2001-10-25 Thread Dossy
On 2001.10.25, Andrew Piskorski [EMAIL PROTECTED] wrote: Unfortunately, the vendor of this closed-source API ships only the non-shared libfoo.a version of their library - they don't ship a libfoo.so. So, just make a libfoo.so that only consists of libfoo.a linked in. gcc -shared -o libfoo.so