[Issue 13359] New: Multiple definition of `format_c_5b3` with three libraries and local imports
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Aug 22 11:06:32 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13359
Issue ID: 13359
Summary: Multiple definition of `format_c_5b3` with three
libraries and local imports
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: link-failure, rejects-valid
Severity: major
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: verylonglogin.reg at gmail.com
The first library is Phobos, probably `-unittest` switch is needed to use its
local imports. This code should build fine:
m1.d:
---
struct S1 { } // should be before `f1`
void f1() { import std.ascii; }
---
m2.d:
---
struct S2 { } // should be before `f2`
void f2() { import std.ascii; }
---
Command (for Windows):
---
dmd -unittest -lib m1.d
dmd -unittest -lib m2.d m1.lib
---
m2.lib: Error: multiple definition of format_c_5b3: _D9format.1212__ModuleInfoZ
and format: _D9format.1212__ModuleInfoZ
m2.lib: Error: multiple definition of format_c_5b3: __D9format.129__modtestFZv
and format: __D9format.129__modtestFZv
---
This is at least major issue as it breaks building libraries and doesn't give
any clue of its reason.
--
More information about the Digitalmars-d-bugs
mailing list