I'm not sure if I have sucessfully achieved something like this before or is it even possible right now, but there is a sample file that comes with DMD compiler: D\dmd2\samples\d\winsamp.d
The problem: winsamp.d
have to be compiled with .def
file.
/+ Compile with:
+ dmd winsamp winsamp.def
+ or:
+ dmd winsamp -L-Subsystem:Windows
+
+ 64 bit version:
+ dmd -m64 winsamp -L-Subsystem:Windows user32.lib
+/
This is how the .def
file looks like
(D\dmd2\samples\d\winsamp.def
):
EXETYPE NT
SUBSYSTEM WINDOWS
The question: Is there a way to include the .def
file instructions inside .d
file, so that there won't be a need for additional .def
file when compiling. (dmd winsamp
)