digitalmars.D.learn - libdl issues with DUB
- Flamaros (9/9) Dec 17 2013 When I build our project with DUB under linux I get some link
- Marco Leise (8/19) Dec 17 2013 More likely you do a one-step build in Mono-D and compile
- yazd (9/18) Dec 17 2013 You'll need to add this to your package file:
- Flamaros (5/25) Dec 17 2013 Thx.
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.
Dec 17 2013
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
Dec 17 2013
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.
Dec 17 2013
On Tuesday, 17 December 2013 at 17:05:36 UTC, yazd wrote:On Tuesday, 17 December 2013 at 12:41:16 UTC, Flamaros wrote:Thx. It seems to be not the only Issue I got, I have a memory error now. I'll investigate on it.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.
Dec 17 2013