www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Compiling Phobos as a shared library?

reply kinghajj <kinghajj_member pathlink.com> writes:
Is it possible to compile Phobos as a dynamic (shared) library instead of a
static? I'm trying this in the makefile:

libphobos.so: $(OBJS) internal/gc/dmgc.a linux.mak
gcc -shared -o $  $(OBJS) $(ZLIB_OBJS) $(GC_OBJS) $(RECLS_OBJS)

But it gives me these errors:

internal/gc/gclinux.o(.data+0x0): multiple definition of `MAP_FAILED'
linux.o(.data+0x0): first defined here
/usr/bin/ld: libphobos.so: undefined versioned symbol name _d_throw 4
/usr/bin/ld: failed to set dynamic section sizes: Bad value

Does anyone know how to fix these, so that I can compile phobos to a dynamic
library?
Jul 11 2004
parent Juanjo =?ISO-8859-15?Q?=C1lvarez?= <juanjuxNO SPAMyahoo.es> writes:
 Does anyone know how to fix these, so that I can compile phobos to a
 dynamic library?
From http://www.digitalmars.com/d/dcompiler.html section "Linux Bugs": Shared libraries cannot be generated.
Jul 12 2004