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 get a static dcd.lib file that contains all the code it needs?

$ dub build --combined

That may work. No guarantees. Dub isn't setup for distribution like this.

combined didn't work, i still get a bunch of unresolved symbols (although less long):

https://gist.github.com/ryuukk/d59eb89979f1666139ffe0ac95307f20

I've got it to work via:

$ cd DCD
$ dub build --build-mode=allAtOnce --combined
$ cd ..
$ ldc2 app.d DCD/dcd.lib

```d
void main(string[] args)
{
    init_dcd();
}

extern(C) void init_dcd() {}
```

ldc2 on Windows.

DCD/dcd.lib should be about 23mb.

I did have to hunt some files down, it seems some build commands in DCD isn't setup for this (almost certainly not using the environment variables that dub offers to handle this situation).
  • How to build a s... ryuukk_ via Digitalmars-d-learn
    • Re: How to ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: How... ryuukk_ via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... ryuukk_ via Digitalmars-d-learn
            • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
        • Re:... Mike Parker via Digitalmars-d-learn
          • ... ryuukk_ via Digitalmars-d-learn
            • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
            • ... Steven Schveighoffer via Digitalmars-d-learn
            • ... Mike Parker via Digitalmars-d-learn
              • ... Hipreme via Digitalmars-d-learn
      • Re: How... ryuukk_ via Digitalmars-d-learn
    • Re: How to ... Ruby The Roobster via Digitalmars-d-learn

Reply via email to