Re: Including C sources in a DUB project

2022-05-10 Thread Alexander Zhirov via Digitalmars-d-learn
On Wednesday, 11 May 2022 at 05:11:10 UTC, Alexander Zhirov wrote: dub.settings.json It's written about it [here](https://dub.pm/settings)

Re: Including C sources in a DUB project

2022-05-10 Thread Alexander Zhirov via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 22:12:52 UTC, Dennis wrote: It depends on whether your DMD or LDC installation comes first in your PATH environment variable. Both ship with a `dub` executable that uses their compiler as default. I came across something else like this. Created a

Re: Including C sources in a DUB project

2022-05-10 Thread Dennis via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 20:50:12 UTC, Alexander Zhirov wrote: And if there are two compilers in the system - `dmd` and `ldc`, which compiler chooses `dub.json`? It depends on whether your DMD or LDC installation comes first in your PATH environment variable. Both ship with a `dub`

Re: Including C sources in a DUB project

2022-05-10 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 20:50:12 UTC, Alexander Zhirov wrote: On Tuesday, 10 May 2022 at 19:13:21 UTC, Dennis wrote: It has an example directory: https://github.com/dlang/dub/tree/master/examples And if there are two compilers in the system - `dmd` and `ldc`, which compiler chooses

Re: Including C sources in a DUB project

2022-05-10 Thread Alexander Zhirov via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 19:13:21 UTC, Dennis wrote: It has an example directory: https://github.com/dlang/dub/tree/master/examples And if there are two compilers in the system - `dmd` and `ldc`, which compiler chooses `dub.json`? And how do I specify the specific compiler I want?

Re: Including C sources in a DUB project

2022-05-10 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 19:13:21 UTC, Dennis wrote: [snip] It has an example directory: https://github.com/dlang/dub/tree/master/examples If your configuration is missing, you could make a Pull Request to add it. So it does. Thanks. We might also link to that on the dub.pm website.

Re: Including C sources in a DUB project

2022-05-10 Thread Dennis via Digitalmars-d-learn
On Tuesday, 10 May 2022 at 17:19:23 UTC, jmh530 wrote: It would be nice if dub included a directory of example configurations for common issues like this. It has an example directory: https://github.com/dlang/dub/tree/master/examples If your configuration is missing, you could make a Pull

Re: Including C sources in a DUB project

2022-05-10 Thread jmh530 via Digitalmars-d-learn
On Monday, 9 May 2022 at 09:17:06 UTC, Alexander Zhirov wrote: [snip] It would be nice if dub included a directory of example configurations for common issues like this.

Re: Including C sources in a DUB project

2022-05-09 Thread Alexander Zhirov via Digitalmars-d-learn
On Friday, 6 May 2022 at 11:31:27 UTC, Alexander Zhirov wrote: Does anyone have examples of such a configuration? I managed to do it like this: ```js { "name": "app", "authors": [ "Alexander Zhirov" ], "description": "MyProgram", "dflags": [ "-i" ],

Re: Including C sources in a DUB project

2022-05-06 Thread Alexander Zhirov via Digitalmars-d-learn
On Thursday, 5 May 2022 at 06:05:55 UTC, Alexander Zhirov wrote: It turns out to compile everything manually, but I would like to do it all through the dub project. Does anyone have examples of such a configuration?

Re: Including C sources in a DUB project

2022-05-05 Thread Alexander Zhirov via Digitalmars-d-learn
On Thursday, 5 May 2022 at 16:23:18 UTC, H. S. Teoh wrote: I don't know how to do it using dub, but you could use pragma(lib) in one (or more) of your source files as a workaround: pragma(lib, "m"); pragma(lib, "X11"); pragma(lib, "Xrandr"); I remember a long time

Re: Including C sources in a DUB project

2022-05-05 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, May 05, 2022 at 06:05:55AM +, Alexander Zhirov via Digitalmars-d-learn wrote: > I'm sure there is such a topic on the forum, but after scrolling > through the search, I didn't find anything. The bottom line is that I > want to enable compilation of C sources in DUB and then build the