[Issue 24127] ImportC - no way to organize files
https://issues.dlang.org/show_bug.cgi?id=24127 Steven Schveighoffer changed: What|Removed |Added Keywords||ImportC --
[Issue 24127] ImportC - no way to organize files
https://issues.dlang.org/show_bug.cgi?id=24127 Walter Bright changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #1 from Walter Bright --- The exact same thing happens when cstuff.c is actually named cstuff.d. But, when: module foo.bar.cstuff; is added to cstuff.d, it compiles without error. The trouble is, when a module statement is not present, the compiler names the module as if: module ; was present. is `cstuff`. The compiler does the same thing for .c files - it assigns a module name of `cstuff`, not `foo.bar.cstuff`. This boils down to the fact that C files do not have a means to name the module. I think we're kinda stuck here. --
[Issue 24127] ImportC - no way to organize files
https://issues.dlang.org/show_bug.cgi?id=24127 --- Comment #2 from Steven Schveighoffer --- (In reply to Walter Bright from comment #1) > This boils down to the fact that C files do not have a means to name the > module. I think we're kinda stuck here. ImportC added import statements to C files, why not module statements? --
[Issue 24127] ImportC - no way to organize files
https://issues.dlang.org/show_bug.cgi?id=24127 Chance Snow changed: What|Removed |Added CC||g...@chancesnow.me --- Comment #3 from Chance Snow --- I'm experiencing this issue across Dub libraries. I maintain multiple libraries that had used the same name for C modules, e.g. "bindings.c". The compiler complains about module conflicts when an application depends on both libraries. I am forced to workaround this issue by manually namespacing my C modules, e.g. "wgpu_bindings.c". --
[Issue 24127] ImportC - no way to organize files
https://issues.dlang.org/show_bug.cgi?id=24127 Andrea Fontana changed: What|Removed |Added CC||trik...@gmail.com --- Comment #4 from Andrea Fontana --- Similar problem here. A C library with different file with the same name: hello/utils.c world/utils.c dmd hello/utils.c world/utils.c won't compile. --