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

           Summary: extern function pointers inside functions
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: link-failure, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: simen.kja...@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kja...@gmail.com> 2010-08-04 01:47:41 
PDT ---
import std.c.windows.windows;

The following code compiles, but does not link:

void main(string[] args) {
    extern (Windows) HINSTANCE ShellExecuteW(HWND, LPCWSTR, LPCWSTR,
        LPCWSTR, LPCWSTR, INT);

    HINSTANCE i = ShellExecuteW(null, "open",
"http://www.example.com";, null, null, SW_SHOW);
}

Error 42: Symbol Undefined
__d4test4mainfaayazi13shellexecutewmwt4core3sys7windows7windows6handlepxupxupxupxuizt4core3sys7windows7windows6han...@24

As we can see, the symbol is D mangled, which it should not be.

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

Reply via email to