Daniel Worthington <daniel.worthing...@gmail.com> wrote:
import std.c.windows.windows; int 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); return 0; } Error 42: Symbol Undefined __d4test4mainfaayazi13shellexecutewmwt4core3sys7windows7windows6handlepxupxupxupxuizt4core3sys7windows7windows6han...@24
Move your declaration of ShellExecuteW outside main, and it will work: import std.c.windows.windows; extern (Windows) HINSTANCE ShellExecuteW(HWND, LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, INT); int main(string[] args) { HINSTANCE i = ShellExecuteW(null, "open", "http://www.example.com", null, null, SW_SHOW); return 0; } This should work, though, so I'm filing a bug on it: http://d.puremagic.com/issues/show_bug.cgi?id=4581 -- Simen