Bug 22750 – dmd -i: undefined symbol error using templates defined in .di file

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-02-08T20:45:27Z
Last change time
2024-12-13T19:20:52Z
Keywords
ImportC
Assigned to
No Owner
Creator
duser
Moved to GitHub: dmd#18084 →

Comments

Comment #0 by duser — 2022-02-08T20:45:27Z
// 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(); }
Comment #1 by robert.schadek — 2024-12-13T19:20:52Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18084 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB