HOw to compile SHARED libs?

HOw to compile SHARED libs?

Post by Energy Management Ass » Mon, 30 Aug 1993 11:40:36



Could someone tell me how to compile library sources into a SHARED library?
I looked in the GNU CC manual and saw a -shared option, but the manual said
it only worked on a few examples. The main problem I am having is with
the XPM library. It built as a .a file just fine, but I can't get it to
build shared, which is how fvwm expects it. If anyone has advice, please
send it to


For whatever reason, we don't currently get comp.os.linux.help at my office.

Thanks,
Joey Gibson

 
 
 

1. 1 * vxjcLnWdi-Compiling shared lib with native Sun compiler (cc, aka, CC)

I have been happily working along building my shared libraries with GCC,
using the usual: gcc -fPIC -c foo.c

Then I link it with: ld -G -h libfoo.so.1 -o libfoo.so foo.o

and everything is peachy.  Today, I tried to do the same thing with the
native compiler, using: cc -pic -c foo.c (and the same ld cmd to link)
but when I then try to link against the lib, it says it can't find any
of
the symbols (routines declared in the shared lib).  As I say, it works
fine
in gcc.

Assuming that there would be some benefit in using the native compiler,
is
there any other command line options I need to include to make the
symbols
visible?

2. ELF.. I'm proof it works!

3. 1 * BgyKFFrNo-Compiling shared lib with native Sun compiler (cc, aka, CC)

4. PPP REconnecting strange

5. Compiling shared libs in aix

6. PVID duplication recovery

7. 2 * tCTtngjxY-Compiling shared lib with native Sun compiler (cc, aka, CC)

8. MkLinux - does it work for you?

9. Compiling shared lib with native Sun compiler (cc, aka, CC)

10. newdie: compiling shared libs

11. Compiling Shared Libs

12. 1 * xuzIBiqvq-Compiling shared lib with native Sun compiler (cc, aka, CC)

13. 1 * NmepTvXvo-Compiling shared lib with native Sun compiler (cc, aka, CC)