Linking multiple libraries

Basile B. b2.temp at gmx.com
Mon Feb 12 00:24:47 UTC 2018


On Sunday, 11 February 2018 at 01:38:41 UTC, b2.temp wrote:
> On Sunday, 26 November 2017 at 11:15:58 UTC, Jacob Carlborg 
> wrote:
>> On 2017-11-25 23:31, Mike Parker wrote:
>>
>> For "ld" on macOS the order does not matter. For "ld" on Linux 
>> the order does matter, but, if necessary, the following flags 
>> can be used to link libraries in any order: "--start-group" 
>> and "--end-group". Those flag will cause the linker to search 
>> the libraries repeatedly to resolve undefined symbols.
>
> These flags should be  passed to ld by DMD i think

The flags could be put before and after this loop:
https://github.com/dlang/dmd/blob/master/src/dmd/link.d#L602


More information about the Digitalmars-d-learn mailing list