digitalmars.D.bugs - [Issue 22625] New: importC: original name of typedef'd struct not
- d-bugmail puremagic.com (31/31) Dec 22 2021 https://issues.dlang.org/show_bug.cgi?id=22625
https://issues.dlang.org/show_bug.cgi?id=22625 Issue ID: 22625 Summary: importC: original name of typedef'd struct not visible in D when compiling separately Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: duser airmail.cc cmodule.c: --- typedef struct data_s { int x; } data_t; --- dmodule.d: --- import cmodule : data_s, data_t; --- compile using "dmd -c dmodule.d" and get this: dmodule.d(1): Error: module `cmodule` import `data_s` not found, did you mean alias `cmodule.data_t`? if the C file is added to the command line like "dmd -c dmodule.d cmodule.c", then the error goes away version: DMD64 D Compiler v2.098.0-361-g415e58e6d --
Dec 22 2021