ImportC in a Dub project
Imperatorn
johan_forsberg_86 at hotmail.com
Fri Oct 28 19:27:37 UTC 2022
On Friday, 28 October 2022 at 19:04:21 UTC, Carsten Schlote wrote:
> 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.
Have you read this?
https://dlang.org/spec/importc.html
More information about the Digitalmars-d-learn
mailing list