Thread overview | ||||||
---|---|---|---|---|---|---|
|
December 17, 2013 libdl issues with DUB | ||||
---|---|---|---|---|
| ||||
When I build our project with DUB under linux I get some link errors about libdl, that is messing. In my main I have the following lines : version(Posix) { pragma(lib, "dl"); } This works well with MonoD, so it seems like version Posix isn't defined with DUB or pragma ignored. |
December 17, 2013 Re: libdl issues with DUB | ||||
---|---|---|---|---|
| ||||
Posted in reply to Flamaros | Am Tue, 17 Dec 2013 13:41:14 +0100 schrieb "Flamaros" <flamaros.xavier@gmail.com>: > When I build our project with DUB under linux I get some link > errors about libdl, that is messing. > In my main I have the following lines : > > version(Posix) > { > pragma(lib, "dl"); > } > > This works well with MonoD, so it seems like version Posix isn't defined with DUB or pragma ignored. More likely you do a one-step build in Mono-D and compile single modules through DUB. Can you post the exact error message please? Does it print libdl or does it complain about undefined dlopen et altera? -- Marco |
December 17, 2013 Re: libdl issues with DUB | ||||
---|---|---|---|---|
| ||||
Posted in reply to Flamaros | On Tuesday, 17 December 2013 at 12:41:16 UTC, Flamaros wrote: > When I build our project with DUB under linux I get some link errors about libdl, that is messing. > In my main I have the following lines : > > version(Posix) > { > pragma(lib, "dl"); > } > > This works well with MonoD, so it seems like version Posix isn't defined with DUB or pragma ignored. You'll need to add this to your package file: "libs-posix": ["dl"] Check the documentation here for more information http://code.dlang.org/package-format#build-settings The reason this works on DMD is that it builds and links the executable in one step. Dub separates that to two steps. And so this pragma will be useless. |
December 17, 2013 Re: libdl issues with DUB | ||||
---|---|---|---|---|
| ||||
Posted in reply to yazd | On Tuesday, 17 December 2013 at 17:05:36 UTC, yazd wrote:
> On Tuesday, 17 December 2013 at 12:41:16 UTC, Flamaros wrote:
>> When I build our project with DUB under linux I get some link errors about libdl, that is messing.
>> In my main I have the following lines :
>>
>> version(Posix)
>> {
>> pragma(lib, "dl");
>> }
>>
>> This works well with MonoD, so it seems like version Posix isn't defined with DUB or pragma ignored.
>
> You'll need to add this to your package file:
>
> "libs-posix": ["dl"]
>
> Check the documentation here for more information http://code.dlang.org/package-format#build-settings
>
> The reason this works on DMD is that it builds and links the executable in one step.
> Dub separates that to two steps. And so this pragma will be useless.
Thx.
It seems to be not the only Issue I got, I have a memory error now.
I'll investigate on it.
|
Copyright © 1999-2021 by the D Language Foundation