ImportC in a Dub project

Carsten Schlote carsten.schlote at gmx.net
Fri Oct 28 19:04:21 UTC 2022


On Friday, 28 October 2022 at 18:56:03 UTC, Imperatorn wrote:
> Like schveiguy said, what's your build line? dmd should pick up 
> the file if the import has the same name as the file.

What do you mean with 'buildline'? The project is build with dub. 
See previous posts with outputs from commandline.

DMD does find and import the C file. But it doesn't create code 
for ```relatedCode()``` in the C file. The only way to fix this, 
is to compile it with a C compiler and use the object as 
additional linker output.

IMHO this is a bug.



More information about the Digitalmars-d-learn mailing list