Hi guys, I have an issue when I compile program with using windows api, I got this message:
"reference to an unresolved external symbol _MessageBoxW@16". I just created simple hello world using winapi and MessageBox.
import core.runtime;
import std.stdio;
import std.string;
import core.sys.windows.windows;
extern(Windows)
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int nCmdShow) {
int result;
try {
Runtime.initialize();
result = myWinMain(hInstance, hPrevInstance, cmdLine, nCmdShow);
Runtime.terminate();
} catch (Throwable e) {
result = 0;
}
return result;
}
int myWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR cmdLine, int nCmdShow) {
MessageBox(null, "Hello", "D!", MB_OK);
return 0;
}