pragma lib doesn't support static libraries?
ryuukk_
ryuukk.dev at gmail.com
Sun Jul 30 06:01:26 UTC 2023
On Sunday, 30 July 2023 at 05:53:55 UTC, Mike Parker wrote:
> On Sunday, 30 July 2023 at 05:28:32 UTC, ryuukk_ wrote:
>> I should have explained exactly what i am doing..
>>
>> Looks like it doesn't work when i compile in 2 step
>>
>> - compile with: ``dmd -c of=bin/game.o``
>> - link with: ``dmd bin/game.o``
>>
>> When doing it this way, then it doesn't work
>>
>> However, when compiling/linking in one ``dmd`` invocation
>> (without ``-c``), then it all works
>>
>> So it looks like the pragma is not passed on the linked when
>> it was compiled with ``-c``
>>
>> Is this a bug? should i report it?, or is that the expected
>> behavior?
>
> It's expected behavior. There's no link step in the first
> command, so the pragma is meaningless there. And I'm unaware of
> any mechanism for embedding static library names in an object
> file for a linker to read later.
Oh ok, i'll stick to a one command invocation then, it'll further
simplify my build script
More information about the Digitalmars-d-learn
mailing list