I am trying to compile the following code using:
dmd test.d
or
dmd test.d shell32.lib
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;
}
In either case I get the following error:
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
I think I must be doing something really stupid, and I'm new to D :-)
Daniel