https://issues.dlang.org/show_bug.cgi?id=24129

Walter Bright <bugzi...@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzi...@digitalmars.com

--- Comment #1 from Walter Bright <bugzi...@digitalmars.com> ---
The problem stems from when a.c and b.c are compiled together, as in:

    dmd a.c b.c

The code from both gets placed in one object file, a.obj. Hence there are two
copies of __acrt_local_get_ctype_array value, and they conflict with each
other.

The workaround is to compile them separately.

The same result is exhibited with this simple test case:

--- a.c ---
inline int test() { return 73; }

void *def() { return &test; }

int main() { return 0; }
----- b.c -------
inline int test() { return 73; }

void *def() { return &test; }
---------------

dmd a.c b.c
a.obj : fatal error LNK1179: invalid or corrupt file: duplicate COMDAT 'test'
Error: linker exited with status 1179

--

Reply via email to