Thread overview |
---|
April 16, 2020 How can I fully include "libdruntime-ldc.a" and "libphobos2-ldc.a" in my .so lib ? | ||||
---|---|---|---|---|
| ||||
My dub recipe includes this "dflags" : [ "bin/libdruntime-ldc.a", "bin/libphobos2-ldc.a" ] so that ideally I'll get everything in the library but this does not work. For example rt_init and rt_term are no visible in the exports $ nm -D libdexed-d.so | grep rt_init $ and the project that uses the library does not link anyway, unless I instruct LD to use libdruntime-ldc.so. |
April 16, 2020 Re: How can I fully include "libdruntime-ldc.a" and "libphobos2-ldc.a" in my .so lib ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile B. | On Thursday, 16 April 2020 at 09:48:21 UTC, Basile B. wrote:
> My dub recipe includes this
>
> "dflags" : [
> "bin/libdruntime-ldc.a",
> "bin/libphobos2-ldc.a"
> ]
>
> so that ideally I'll get everything in the library but this does not work. For example rt_init and rt_term are no visible in the exports
>
> $ nm -D libdexed-d.so | grep rt_init
> $
>
> and the project that uses the library does not link anyway, unless I instruct LD to use libdruntime-ldc.so.
Just got it to work using
"libs" : [
"druntime-ldc",
"phobos2-ldc"
]
instead of what was in the original question.
|
April 16, 2020 Re: How can I fully include "libdruntime-ldc.a" and "libphobos2-ldc.a" in my .so lib ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Basile B. | On Thursday, 16 April 2020 at 10:04:54 UTC, Basile B. wrote: > Just got it to work using > > "libs" : [ > "druntime-ldc", > "phobos2-ldc" > ] $ ldc2 -help | grep -- -link-defaultlib-shared --link-defaultlib-shared - Link with shared versions of default libraries. Defaults to true when generating a shared library (-shared). Boolean options can take an optional value, e.g., -link-defaultlib-shared=<true,false>. |
April 16, 2020 Re: How can I fully include "libdruntime-ldc.a" and "libphobos2-ldc.a" in my .so lib ? | ||||
---|---|---|---|---|
| ||||
Posted in reply to kinke | On Thursday, 16 April 2020 at 12:45:21 UTC, kinke wrote:
> On Thursday, 16 April 2020 at 10:04:54 UTC, Basile B. wrote:
>> Just got it to work using
>>
>> "libs" : [
>> "druntime-ldc",
>> "phobos2-ldc"
>> ]
>
> $ ldc2 -help | grep -- -link-defaultlib-shared
> --link-defaultlib-shared - Link with shared versions of default libraries. Defaults to true when generating a shared library (-shared).
> Boolean options can take an optional value, e.g., -link-defaultlib-shared=<true,false>.
Thanks. The first solution was not working acutally, got SIGABRT when running
|
Copyright © 1999-2021 by the D Language Foundation