www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1676] New: Undefined symbol at linking with circular import and enum

reply d-bugmail puremagic.com writes:

           Summary: Undefined symbol at linking with circular import and
           Product: D
           Version: 1.023
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: link-failure
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: smjg iname.com

----- linkfail_a.d -----
import linkfail_b;

void main() {}

enum Qwert : byte { YUIOP, ASDFG }

struct Hjkl {
    Qwert zxcvb() {
        return Qwert.YUIOP;
----- linkfail_b.d -----
import linkfail_a;

void nm() {
    try {
    } catch (Object e) {}

void qaz(Qwert wsx) {}

const int[] edc = [ Qwert.YUIOP: 42, 105 ];

dmd -c linkfail_a.d
dmd -c linkfail_b.d
dmd linkfail_a.obj linkfail_b.obj

dmd -c linkfail_b.d
dmd linkfail_a.d linkfail_b.obj

dmd linkfail_a.d linkfail_b.d

Both failure cases give the same error:
d:\dmd\bin\..\..\dm\bin\link.exe linkfail_a+linkfail_b,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 Error 42: Symbol Undefined _D10linkfail_a4Hjkl5zxcvbMFZE10linkfail_a5Qwert
--- errorlevel 1

This bites the date/time code in my utility library.  At least, I *think* this
is a regression....

Nov 16 2007
parent d-bugmail puremagic.com writes:

Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED

I can confirm that this was failing in 1.023, but had been working in 1.020.
It now works in both D1 and D2. Was fixed somewhere between 1.024 and 1.036
(works in 1.036).

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 15 2009