[Issue 3975] New: Misnamed main causes linker errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 16 08:15:52 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3975

           Summary: Misnamed main causes linker errors
           Product: D
           Version: 1.057
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: baseball.mjp at gmail.com


--- Comment #0 from Michael P <baseball.mjp at gmail.com> 2010-03-16 08:15:49 PDT ---
typo.d:
void mann() { }

michael at michael-laptop:~/d/projects$ dmd typo.d
/home/michael/dmd/linux/bin/../lib/libphobos.a(dmain2_7a_1a5.o): In function
`main':
internal/dmain2.d:(.text.main+0x74): undefined reference to `_Dmain'
internal/dmain2.d:(.text.main+0xc5): undefined reference to `_Dmain'
/home/michael/dmd/linux/bin/../lib/libphobos.a(deh2_171_525.o): In function
`_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable':
internal/deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x4):
undefined reference to `_deh_beg'
internal/deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0xc):
undefined reference to `_deh_beg'
internal/deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x13):
undefined reference to `_deh_end'
internal/deh2.d:(.text._D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x37):
undefined reference to `_deh_end'
collect2: ld returned 1 exit status
--- errorlevel 1

Should this be happening?
Compiling with -c is fine, and produces no output.

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


More information about the Digitalmars-d-bugs mailing list