Re: pragma lib doesn't support static libraries?

2023-07-30 Thread ryuukk_ via Digitalmars-d-learn
On Sunday, 30 July 2023 at 15:40:08 UTC, Adam D Ruppe wrote: On Sunday, 30 July 2023 at 05:53:55 UTC, Mike Parker wrote: And I'm unaware of any mechanism for embedding static library names in an object file for a linker to read later. There is a mechanism on Windows, so it tends to work

Re: pragma lib doesn't support static libraries?

2023-07-30 Thread Adam D Ruppe via Digitalmars-d-learn
On Sunday, 30 July 2023 at 05:53:55 UTC, Mike Parker wrote: And I'm unaware of any mechanism for embedding static library names in an object file for a linker to read later. There is a mechanism on Windows, so it tends to work there, but yeah no luck on the other platforms.

Re: pragma lib doesn't support static libraries?

2023-07-30 Thread ryuukk_ via Digitalmars-d-learn
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``

Re: pragma lib doesn't support static libraries?

2023-07-29 Thread Mike Parker via Digitalmars-d-learn
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

Re: pragma lib doesn't support static libraries?

2023-07-29 Thread ryuukk_ via Digitalmars-d-learn
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

pragma lib doesn't support static libraries?

2023-07-29 Thread ryuukk_ via Digitalmars-d-learn
Hello, I'm trying to simplify my build script, i have this library that i statically link OS: linux ``dmd app.d mongoose/bin/linux/mongoose.a`` becomes: ``` package mongoose; pragma(lib, "mongoose/bin/linux/mongoose.a"); ``` However, it no longer compile, and it complains about