www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - gdc and shared objects

reply Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
using gdc (Debian 6.3.0-18) 6.3.0 20170516

I find:

gdc -I. -fPIC -c -o code.o code.d
gdc -o libanswer.so -shared code.o

leads to problems because the linker tries to link against:

/usr/lib/gcc/x86_64-linux-gnu/6/libgdruntime.a

instead of against one of:

/usr/lib/gcc/x86_64-linux-gnu/6/libgdruntime.so
/usr/lib/x86_64-linux-gnu/libgdruntime.so.68.0.2
/usr/lib/x86_64-linux-gnu/libgdruntime.so.68

I hope I am just missing an option as everything seems to be there fore
this to work.

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Jun 06
parent Mike Wey <mike-wey example.com> writes:
On 06/06/2017 05:07 PM, Russel Winder via Digitalmars-d-learn wrote:
 I hope I am just missing an option as everything seems to be there fore
 this to work.
You are missing the `-shared-libphobos` option. -- Mike Wey
Jun 06