Re: How to build a static lib properly?

2023-03-05 Thread Mike Parker via Digitalmars-d-learn
On Monday, 6 March 2023 at 02:09:23 UTC, ryuukk_ wrote: dub should build a static library for the project i build, that includes each library it uses that are referenced as "library" since the default is "staticLibrary" according to rikki What you're asking for is a different use case.

Re: How to build a static lib properly?

2023-03-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/5/23 9:09 PM, ryuukk_ wrote: On Monday, 6 March 2023 at 02:00:16 UTC, Mike Parker wrote: This is not dub's fault. When building a shared library, there's a link step, so any external dependencies are linked into the shared library just as they are with an executable. There is no link

Re: How to build a static lib properly?

2023-03-05 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 06/03/2023 3:49 PM, ryuukk_ wrote: On Monday, 6 March 2023 at 01:57:21 UTC, Richard (Rikki) Andrew Cattermole wrote: On 06/03/2023 2:52 PM, ryuukk_ wrote: Are you saying dub doesn't build a static dcd.lib? It did, but it doesn't contain any of the dependencies. What to do to make it so i

Re: How to build a static lib properly?

2023-03-05 Thread ryuukk_ via Digitalmars-d-learn
On Monday, 6 March 2023 at 02:54:42 UTC, Ruby The Roobster wrote: On Monday, 6 March 2023 at 00:55:04 UTC, ryuukk_ wrote: Hello, I am trying to build: https://github.com/dlang-community/DCD/ as a static lib [...] Try ```dub build --build-mode=allAtOnce```. That didn't work However,

Re: How to build a static lib properly?

2023-03-05 Thread Ruby The Roobster via Digitalmars-d-learn
On Monday, 6 March 2023 at 00:55:04 UTC, ryuukk_ wrote: Hello, I am trying to build: https://github.com/dlang-community/DCD/ as a static lib [...] Try ```dub build --build-mode=allAtOnce```.

Re: How to build a static lib properly?

2023-03-05 Thread ryuukk_ via Digitalmars-d-learn
On Monday, 6 March 2023 at 01:57:21 UTC, Richard (Rikki) Andrew Cattermole wrote: On 06/03/2023 2:52 PM, ryuukk_ wrote: Are you saying dub doesn't build a static dcd.lib? It did, but it doesn't contain any of the dependencies. What to do to make it so i get a static dcd.lib file that

Re: How to build a static lib properly?

2023-03-05 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 06/03/2023 3:09 PM, ryuukk_ wrote: This is a bug in DCD in my book This has nothing to do with DCD. This is on DUB, it was never designed for anything related to distribution. Nobody has attempted to change this. All the information is available for it to do it. Just a matter of

Re: How to build a static lib properly?

2023-03-05 Thread ryuukk_ via Digitalmars-d-learn
On Monday, 6 March 2023 at 02:00:16 UTC, Mike Parker wrote: On Monday, 6 March 2023 at 01:52:06 UTC, ryuukk_ wrote: 6B71D90\dparse.lib -g ``` Are you saying dub doesn't build a static dcd.lib? What to do to make it so i get a static dcd.lib file that contains all the code it needs? This

Re: How to build a static lib properly?

2023-03-05 Thread Mike Parker via Digitalmars-d-learn
On Monday, 6 March 2023 at 01:52:06 UTC, ryuukk_ wrote: 6B71D90\dparse.lib -g ``` Are you saying dub doesn't build a static dcd.lib? What to do to make it so i get a static dcd.lib file that contains all the code it needs? This comfort me in my desire to no longer use dub ever This is

Re: How to build a static lib properly?

2023-03-05 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 06/03/2023 2:52 PM, ryuukk_ wrote: Are you saying dub doesn't build a static dcd.lib? It did, but it doesn't contain any of the dependencies. What to do to make it so i get a static dcd.lib file that contains all the code it needs? $ dub build --combined That may work. No guarantees.

Re: How to build a static lib properly?

2023-03-05 Thread ryuukk_ via Digitalmars-d-learn
Use dub, don't do this manually. i build DCD with DUB, not manually i ask dub to give me a static lib, dcd.lib is the file he gave me, that should be all i yet i get the errors

Re: How to build a static lib properly?

2023-03-05 Thread ryuukk_ via Digitalmars-d-learn
On Monday, 6 March 2023 at 01:46:22 UTC, Richard (Rikki) Andrew Cattermole wrote: In the DCD's dub i changed targetType to "staticLibrary" You didn't need to do that, the default was correct. Then i build: ``dub build -c library`` for the library config Just ``$ dub build`` would've done

Re: How to build a static lib properly?

2023-03-05 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
In the DCD's dub i changed targetType to "staticLibrary" You didn't need to do that, the default was correct. Then i build: ``dub build -c library`` for the library config Just ``$ dub build`` would've done it (first configuration is default). Now for the errors, I think its a simple case

How to build a static lib properly?

2023-03-05 Thread ryuukk_ via Digitalmars-d-learn
Hello, I am trying to build: https://github.com/dlang-community/DCD/ as a static lib In the DCD's dub i changed targetType to "staticLibrary" Then i build: ``dub build -c library`` for the library config But now the weird part On my program i try to link it and i get bunch of unreloved

Re: compile x64 .dll and .so without dependencies

2023-03-05 Thread novice2 via Digitalmars-d-learn
On Sunday, 5 March 2023 at 18:35:58 UTC, Guillaume Piolat wrote: "targetType": "dynamicLibrary", "dflags-linux-dmd": ["-defaultlib=libphobos2.a"], "dflags-osx-ldc": ["-static"], "dflags-linux-ldc": ["-link-defaultlib-shared=false"], "dflags-linux-x86_64-ldc":

Re: compile x64 .dll and .so without dependencies

2023-03-05 Thread Guillaume Piolat via Digitalmars-d-learn
On Sunday, 5 March 2023 at 06:36:05 UTC, novice2 wrote: It there any recipe to compile x64 .dll without dependencies? I mean it shoud be used without installing things like msvcr120.dll. Dependencies on system dll (advapi32.dll, kerner32.dll) is ok. I don't experiment on linux yet. But

Re: Using Windbg to debug D applications and unittests

2023-03-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 4 March 2023 at 19:19:26 UTC, Chris Piker wrote: On Monday, 27 February 2023 at 12:09:50 UTC, Basile B. wrote: At least this is what is done for the Dexed GDB widget, so that gdb breaks automatically when an Error or an Exception is new'd