Building (and including libraries) without dub
drug via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 26 03:06:46 PDT 2017
26.08.2017 13:05, Hasen Judy пишет:
> On Saturday, 26 August 2017 at 10:02:03 UTC, drug wrote:
>> It's like C++. If you use Linux then:
>> ```
>> dmd <list of your .d files like you do> -L/path/to/lib
>> -llibrarynamewithoutlibprefix
>> ```
>> or example
>> ```
>> dmd myapp.d -L../otherproject/lib -lcool
>> ```
>> line above compiles `myapp.d` file and links it with library `libcool`
>> that is place in directory `../otherproject/lib`
>
> Thanks for your response!
>
> So if I may make a guess, when you include a dependency in a dub
> project, what it ends up doing is compiling the dependency separately
> into a lib file then statically link the lib with your project?
Yes
More information about the Digitalmars-d-learn
mailing list