VS is a powerful development tool under Windows and is not covered here. To use the VS tool to develop the D language requires the use of one of the following tools vs a plugin Visuald plugin and DMD compiler.
First, download the relevant tools
1. Download Visual Studio Tools
VS can be downloaded on the http://msdn.itellyou.cn/website, this site is relatively stable, as shown, I am downloading the visual Studio Update 3, the tool has 3.98GB, the software is relatively large, using Thunderbolt download is better.
2. Download DMD compiler
DMD is a compiler of D language, the compiler since the 2.0 version has been relatively large development, is still in perfect, is now more stable. The compiler can be downloaded from the https://dlang.org/Web site, and the latest version is available for download from this address: https://dlang.org/download.html. Historical versions are available from the address below to find http://downloads.dlang.org/releases/. Since I want to use the Dgui library, and Dgui currently needs to compile with the 2.066.1 version, I downloaded version 2.066.1, which is Http://downloads.dlang.org/releases/2014/dmd.2.066.1.windows.zip
3. Download Visual-d Plugin
Visual-d is a plugin for Visual Studio Tools that provides support for D language development, highlighting, and smart hints. The function is already very powerful, can support vs2008,vs2010,vs2012,vs2013,vs2015. Source Address https://github.com/dlang/visuald/. 0.3.43 version Download: Https://github.com/dlang/visuald/releases/download/v0.3.43/VisualD-v0.3.43.exe Other versions available at https:// Github.com/dlang/visuald/releases found
Second, the installation of the environment
Installation of VS,VS installation is not described here.
DMD after downloading the ZIP archive package, unzip the dmd.2.066.1.windows.zip into the c:\d directory as shown in:
DMD decompression can be done after you do not need to do other settings.
Visuald download Good after the direct click can be installed such as:
This step needs to set the DMD compiler path, preferably set, not set or can be configured in VS.
Third, use vs develop a simple program
Open vs2013, New project
After you create a new project, as shown:
As shown, after installing Visuald, there is a menu of visual D in the VS menu that opens the menu as shown
By default, the editor does not have the IntelliSense function (also called auto-complete), needs to be configured, opens the Open Language Options menu, and goes to the D language configuration panel, such as:
Select the writing an identifier option in the D–> Intellisense Show expansion when option. This makes it possible to use the smart sensor when you choose. As shown in the following:
Third, the Debug program
Visuald is able to debug with the VS comes debugging D language, which has certain limitations, the overall is very good, if you can do a more perfect debugger for D better. Let's take a look at the debugging of the D language. Set a breakpoint:
Click "Start" to get the program to go into the breakpoint, and then add the TMP variable to the monitoring, such as:
How, very good effect.
The use of the D language to develop Windows desktop applications, the need to use the GUI library, the current D-based library in the Windows Dgui package structure is better, but the library since 2014 seems to have not updated, the latest version can only use DMD 2.066.1 to compile, Do not know whether to stop the development.
Iv. Engineering Options
1. Global options
This option is primarily to configure the DMD compilation environment, open the path to "tools, options, projects and Solutions->visual D settings-> DMD Directories" opens, as shown in:
DMD install path option is to set the DMD compiler directory
Import paths is the directory that sets the libraries used at compile time
Executable paths is the search path to the tool used to set the compile time, and $ (dmdinstalldir) refers to the directory where the DMD compiler resides.
Library paths is the directory where the Lib files are used in the Setup program.
2. Project option Configuration
This configuration is only valid for the current project, open the path to "right-click on Project –> Properties", as shown in:
Wan Hong Nan
D Language in VS development environment configuration –visual-d plug-in