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.

Reply via email to