Including C sources in a DUB project

Alexander Zhirov azhirov1991 at gmail.com
Thu May 5 06:05:55 UTC 2022


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 project with the connection of libraries. I would like 
to see an example of such a `dub.json` project.

Enable libraries (flags) `-lm`, `-lX11`, `-lXrandr`.


```sh
{
	"name" : "test",
	"description" : "Test project",
	"dependencies" : {
	}
}
```

It turns out to compile everything manually, but I would like to 
do it all through the dub project.


```sh
.
├── dub.json
└── src
     ├── app.d
     └── main.c
```


More information about the Digitalmars-d-learn mailing list