Thread overview | |||||
---|---|---|---|---|---|
|
April 04, 2014 Re: /usr/lib/libldc.so: undefined reference to `ldc::ldc_version' | ||||
---|---|---|---|---|
| ||||
Hi,
On 4 Apr 2014, at 19:09, Konstantinos Margaritis wrote:
> If I remove -L-lldc it compiles a static binary which works just fine
> but I thought I'd try to make the binary smaller.
Not sure I understand what you mean here. libldc is part of the LDC compiler (everything except for the driver), and I don't think it would be easy to use the C++ interface from a D project.
David
|
April 04, 2014 Re: /usr/lib/libldc.so: undefined reference to `ldc::ldc_version' | ||||
---|---|---|---|---|
| ||||
Attachments: | On Fri, 04 Apr 2014 21:15:34 +0200
"David Nadlinger" <code@klickverbot.at> wrote:
> Hi,
>
> On 4 Apr 2014, at 19:09, Konstantinos Margaritis wrote:
> > If I remove -L-lldc it compiles a static binary which works just fine but I thought I'd try to make the binary smaller.
>
> Not sure I understand what you mean here. libldc is part of the LDC compiler (everything except for the driver), and I don't think it would be easy to use the C++ interface from a D project.
Oh, I must have misunderstood, I thought it was the shared version of libphobos-ldc.a, so that I would have smaller target binaries. Is it possible to have shared version of the libphobos-ldc.a libs for that?
Konstantinos
|
April 04, 2014 Re: /usr/lib/libldc.so: undefined reference to `ldc::ldc_version' | ||||
---|---|---|---|---|
| ||||
Hi Konstantinos,
On 4 Apr 2014, at 22:48, Konstantinos Margaritis wrote:
> Oh, I must have misunderstood, I thought it was the shared version of
> libphobos-ldc.a, so that I would have smaller target binaries. Is it
> possible to have shared version of the libphobos-ldc.a libs for that?
Not yet.
To be precise, there actually is support for building druntime and Phobos as shared libraries in our CMake build system already. However, there is not much point to try using that yet, as the GC will not properly scan all the data yet, and module initialization might not work as expected either.
In theory, druntime has the required code in 2.064, or better, 2.065. But it still needs the attention of somebody to thoroughly test it and make any necessary adaptions for LDC. If you are interested in making druntime/Phobos work as a shared library, the best thing would probably just be to check out the merge-2.065 branch from Git, build with -DBUILD_SHARED_LIBS=ON and see what happens.
David
|
Copyright © 1999-2021 by the D Language Foundation