Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread wjoe via Digitalmars-d-learn
On Friday, 18 September 2020 at 14:15:27 UTC, Steven Schveighoffer wrote: On 9/18/20 7:38 AM, wjoe wrote: [...] There are other options. for instance dub (the project) has a library and an application. the config looks like this: configuration "application" { targetType "executable

Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread wjoe via Digitalmars-d-learn
On Friday, 18 September 2020 at 14:01:55 UTC, Mike Parker wrote: On Friday, 18 September 2020 at 12:28:30 UTC, wjoe wrote: 2 issues though. - It doesn't build the library automatically, and You'll have to invoke dub once for each config. Just slap both commands in a script. - Linking fail

Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/18/20 7:38 AM, wjoe wrote: Something like this: configuration "lib" {   targetType "dynamicLibrary"   sourceDir "source/lib/" } configuration "app" {   targetType "executable"   sourceFiles "source/app.d"   linkWith "lib" } I found subConfiguration in the docs but that seems to be re

Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread Mike Parker via Digitalmars-d-learn
On Friday, 18 September 2020 at 12:28:30 UTC, wjoe wrote: 2 issues though. - It doesn't build the library automatically, and You'll have to invoke dub once for each config. Just slap both commands in a script. - Linking fails because error: ld: cannot find -llib Built it manually via dub

Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread wjoe via Digitalmars-d-learn
On Friday, 18 September 2020 at 12:03:45 UTC, Mike Parker wrote: On Friday, 18 September 2020 at 11:38:14 UTC, wjoe wrote: Something like this: configuration "lib" { targetType "dynamicLibrary" sourceDir "source/lib/" } configuration "app" { targetType "executable" sourceFiles "source/

Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread Mike Parker via Digitalmars-d-learn
On Friday, 18 September 2020 at 11:38:14 UTC, wjoe wrote: Something like this: configuration "lib" { targetType "dynamicLibrary" sourceDir "source/lib/" } configuration "app" { targetType "executable" sourceFiles "source/app.d" linkWith "lib" } I found subConfiguration in the docs bu

Re: dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread Danny Arends via Digitalmars-d-learn
On Friday, 18 September 2020 at 11:38:14 UTC, wjoe wrote: Something like this: configuration "lib" { targetType "dynamicLibrary" sourceDir "source/lib/" } configuration "app" { targetType "executable" sourceFiles "source/app.d" linkWith "lib" } I found subConfiguration in the docs bu

dub: Is it possible to have a library target and depend on it in the same dub config?

2020-09-18 Thread wjoe via Digitalmars-d-learn
Something like this: configuration "lib" { targetType "dynamicLibrary" sourceDir "source/lib/" } configuration "app" { targetType "executable" sourceFiles "source/app.d" linkWith "lib" } I found subConfiguration in the docs but that seems to be related to external dependencies. app