On Monday, 25 December 2017 at 16:35:26 UTC, realhet wrote:
Now I have my first DMD 64bit windows console app running. (And I'm already afraid of the upcoming windowed application haha)


My recommendation for getting setup on Windows with D is as follows:

1) Install the latest visual studio community version: https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15 2) Install dmd through the windows installer: https://dlang.org/download.html , exe option under windows. This will correctly configure dmd to use the visual studio install from above. From here on dmd will be able to compiler with -m64 and -m32mscoff from the command line. 3) Install VisualD from http://rainers.github.io/visuald/visuald/StartPage.html 4) Create a D project in visual studio and start programming. Compile and debug as usual in Visual Studio.


For you command line compilation. Why are you passing -c to the compiler? The idea behind D is that you pass all modules at the same time to the compiler. This allows the compiler to reuse template instances across modules and in general compilation with D is fast enough to be able to recompile everything each time you make changes. No need for a build system. A single batch file with one command in it is usually enough. There is no need to call the linker manually. Dmd will do this for you. Just call dmd like this:

dmd -m64 source1.d source2.d source3.d -ofoutput.exe

and thats it. You can add additional options like -O -inline -noboundscheck -g -debug -relase. Those are the most commoly used options.

Kind Regards
Benjamin Thaut



Reply via email to