Global Options
When starting Visual Studio for the first time after installation of Visual D, you might want to check the global settings that can be reached from the Menu Tools -> Options -> Projects:
The Visual D Settings will allow you to enable and disable
- sorting the projects alphabetically
- showing the reason for rebuilding a target in the output window
- showing the build time for each project in the output window
- stop building the solution as soon as a project fails to compile
- showing demangled names in the error list and linker output
- monitor the linker for additional library dependencies
- JSON paths: Directories to search for *.json files to find symbol definitions.
- Resource includes: include paths to pass to the resource compiler when building resource files.
- additional command line options for the "Compile and Run" command
- additional command line options for the "Compile and Debug" command
- the debug engine to be used by the "Compile and Debug" command
For each supported compiler, there is a separate page to setup directories to be used during compilation:
- Install path: The path to the compiler installation folder you entered within the installer.
- DMD: this is not the path to the executable dmd.exe, but the folder that contains the full installation so that the compiler is found as <DMD install path>\windows\bin\dmd.exe
- GDC: this is not the path to the executable gdc.exe, but the folder that contains the full installation so that the compiler is found as <DMD install path>\bin\gdc.exe
- LDC: this is not the path to the executable ldc.exe, but the folder that contains the full installation so that the compiler is found as <DMD install path>\bin\ldc2.exe
- Import paths: Directories to be added to the import paths specified in the project configuration and in the DMD configuration file (also used for import statement completion and finding symbol definition).
- Executable paths: Directories to be added to the PATH environment variable before executing build commands.
- Library paths: Directories to be added to the LIB environment variable before executing build commands.
- override sc.ini:
The latest Windows installer for DMD modifies the default sc.ini by expanding variables according to the most recent Visual C++ installation and Windows SDK installation directories. This is necessary to allow building Win64 executables from the command line without having additional environment variables set. Unfortunately this makes it difficult to use libraries from the current Visual C++ installation if you have multiple Visaul Studio versions installed.
Enabling this option allows to override the linker settings from sc.ini. At the same time the library search paths are added to the command line. Also note that using a 32-bit linker executable is necessary to monitor link dependencies.
Available text replacements:
- $(DMDINSTALLDIR): DMD Install path from the "DMD directories page"
- $(DMDINSTALLDIR): GDC Install path from the "GDC directories page"
- $(DMDINSTALLDIR): LDC Install path from the "LDC directories page"
- $(WINDOWSSDKDIR): Windows SDK Directory
- $(DEVENVDIR): Directory of Visual Studio executable devenv.exe
- $(VSINSTALLDIR): Root directory of Visual Studio installation
- $(VCINSTALLDIR): The directory of the Visual C installation that comes with the running Visual Studio
- $(VISUALDINSTALLDIR): Installation folder of Visual D
- any variable from the system environment enclosed in $()
Please note that you'll also find a new entry "D" in the Text Editor branch to setup syntax highlighting and more.