[Issue 22750] New: dmd -i: undefined symbol error using templates defined in .di file
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 8 20:45:27 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22750
Issue ID: 22750
Summary: dmd -i: undefined symbol error using templates defined
in .di file
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: duser at airmail.cc
// dimodule.di
void fn()() { return; }
// main.d
import dimodule;
void main() { fn(); }
this works with "dmd main.d", but "dmd -i main.d" gives an undefined symbol
error for the template function
tested with versions: dmd v2.098.1 and current git master (commit
cbd0b47e0fa264b1310d302447e2dabb64e4e7ee)
the importC builtin functions in __builtins.di can't be used with dmd -i
because of this:
// main.c
// undefined symbol error with "dmd -i main.c" but works with "dmd main.c"
int main() { double x = __builtin_inf(); }
--
More information about the Digitalmars-d-bugs
mailing list