Thread overview
Shared library problem
Aug 10
kinke
August 10
I have a build of 1.11 (Git master head) in $HOME/BuildArea/LDC.  I have a build of Unit_Threaded using this compiler. As well as the Unit_Threaded shared object, there is the executable  gen-ut-main. However, when the executableis run:

|> LD_LIBRARY_PATH=$HOME/BuildArea/LDC/lib:$HOME/Built/lib $HOME/Built/bin/gen-ut-main
Aborting from rt/sections_elf_shared.d(489) Only one D shared object allowed for static runtime. Link with shared runtime via LDC switch '-link-defaultlib-shared'.Aborted

Do I need -link-defaultlib-shared when building LDC or Unit_Threaded?

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



August 10
On Friday, 10 August 2018 at 15:38:22 UTC, Russel Winder wrote:
> Do I need -link-defaultlib-shared when building LDC or Unit_Threaded?

Hi Russel, you'll need it when building that `gen-ut-main` executable (it's implicit when linking a shared lib, but is required explicitly when linking an executable).
August 10
On Fri, 2018-08-10 at 15:53 +0000, kinke via digitalmars-d-ldc wrote:
> On Friday, 10 August 2018 at 15:38:22 UTC, Russel Winder wrote:
> > Do I need -link-defaultlib-shared when building LDC or Unit_Threaded?
> 
> Hi Russel, you'll need it when building that `gen-ut-main` executable (it's implicit when linking a shared lib, but is required explicitly when linking an executable).

Thanks. Looks like it works as required. PR sent to Unit_Threaded for the Meson build.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk