www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15904] New: Undefined reference to ModuleInfo

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

          Issue ID: 15904
           Summary: Undefined reference to ModuleInfo
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andy.pj.hanson gmail.com

This error requires multiple modules to reproduce.
Recursive imports, `static this`, and `package.d`-style imports are all
apparently required to cause the error.

app.d:

    import foo;
    void main() {}
    static this() {}

foo/package.d:

    import app;

The output of `dmd app.d` is:
    app.o:(.rodata+0x18): undefined reference to `_D3foo12__ModuleInfoZ'
    collect2: error: ld returned 1 exit status
    --- errorlevel 1

--
Apr 09 2016