Module on importC

Walter Bright newshound2 at digitalmars.com
Mon Oct 23 00:45:10 UTC 2023


On 10/22/2023 3:23 PM, Andrea Fontana wrote:
> Is there a way to set modules name for importc? Or to give importc a hint 
> directly on C?
> 
> I'm trying to import a project with a struct like:
> 
> ```
> a/b/utils.c
> a/b/interface.c
> 
> c/d/utils.c
> c/d/interface.c
> 
> e/f/utils.c
> e/f/interface.c
> ```
> 
> All files conflict with each other!

One way is to create a file "a_b_utils.c" with the contents:

```
#include "a/b/utils.c"
```

Repeat for the other files.


More information about the Digitalmars-d mailing list