Including C sources in a DUB project

Alexander Zhirov azhirov1991 at gmail.com
Thu May 5 16:33:46 UTC 2022


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 ago, when I first started learning D, I 
set up a project in dub.json so that he compiled the sources 
written in C, linked the necessary libraries and then assembled 
the project in D along with the C object files. How to do it now 
- I have already forgotten.




More information about the Digitalmars-d-learn mailing list