CTFE in .di files

Stefan Koch uplink.coder at googlemail.com
Wed Apr 18 15:10:42 UTC 2018


On Tuesday, 17 April 2018 at 22:19:19 UTC, Manu wrote:
> I've been having some problems like this: 
> https://issues.dlang.org/show_bug.cgi?id=18774
>
> I have .di files with mixins that generate declarations using 
> CTFE.
> Trouble is, executing the CTFE seems to leave residual 
> references to
> symbols which result in unresolved link errors in the client of 
> the
> .di file.
> This seems wrong to me. CTFE shouldn't leave residual 
> dependencies on
> runtime symbols... is this a well-known issue? Are there common
> workarounds?
>
> I'm surprised I haven't run into this before... I must have 
> just luckily managed to avoid the specific problem structure.

stick an empty extern(C) function into your module with the name 
the linker complained about.


More information about the Digitalmars-d mailing list