Bug 9567 – "Symbol Undefined" linker error after separating project part into library

Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2013-02-21T23:07:00Z
Last change time
2017-06-26T13:56:44Z
Keywords
link-failure
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2013-02-21T23:07:55Z
The issue is triggered when separated project part `y.lib` uses function `a.m1.f1` which is in `x.obj` (`f1` is also used in `x.obj` itself): a.m1.d (from x.obj): --- module a.m1; ... f1(); // calls f1 ... struct S1(alias f) { } S1!(() => 0) f1() { assert(0); } --- Linker output: --- y.lib(m3) Error 42: Symbol Undefined _D1a2m12f1FZS1a2m140__T2S1S30_D1a2m112__lambda2088FNaNbNfZiZ2S1 --- Issue test case: * 7z (1.38 MiB): http://deoma-cmd.ru/files/other/d-issues-test-cases/linker-error-2-test-case.7z * Zip (2.55 MiB): http://deoma-cmd.ru/files/other/d-issues-test-cases/linker-error-2-test-case.zip
Comment #1 by k.hara.pg — 2015-02-05T10:07:47Z
Sorry but .obj and .lib files are useless to find compiler issue. Is this still reproduce with 2.066, 2.066.1, or git-head?
Comment #2 by dlang-bugzilla — 2017-06-26T13:56:44Z
Closing, as there has been no reply in over 2 years. If you can provide a complete self-contained test case starting from D source code, please reopen.