Bug 21193 – add compiler flag in both "Compile+Run" and "Compile+Debug" option does not work

Status
RESOLVED
Resolution
INVALID
Severity
blocker
Priority
P1
Component
visuald
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2020-08-25T00:53:02Z
Last change time
2020-08-25T21:13:53Z
Assigned to
No Owner
Creator
mw

Comments

Comment #0 by mingwu — 2020-08-25T00:53:02Z
The discussion is here: https://forum.dlang.org/thread/[email protected] I just tried add '-d' as it showed here: in both "Compile+Run" and "Compile+Debug" https://rainers.github.io/visuald/visuald/GlobalOptions.html And I did "Rebuild" the solution, but that error still there. I find a work-around (adding "-d" on VisualD doesn't work), I end up add "-d" to the sc.ini file: $ find /mnt/c/project/dlang/dmd-2.093.1 -name '*ini' | grep bin /mnt/c/project/dlang/dmd-2.093.1/windows/bin/sc.ini /mnt/c/project/dlang/dmd-2.093.1/windows/bin64/sc.ini [Environment] DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" "-d" Although I'm on 64-bit Windows 10, change bin64/sc.ini does not work; change bin/sc.ini worked. Hope this will help someone who has similar issues.
Comment #1 by mingwu — 2020-08-25T00:54:39Z
oh, I'm using VisualD-v1.0.1-dmd-2.093.1-ldc2-1.23.0.exe and dmd
Comment #2 by r.sagitario — 2020-08-25T21:13:53Z
"Compile+Run" and "Compile+Debug" have nothing to do with building the solution, these are commands to build a single file without any project (more options are taken from a project if the file is in one). See https://rainers.github.io/visuald/visuald/CompileCommands.html If you want to add -d to the build of a project, you can check "Silently allow deprecated features" in the project configuration page Compiler->Messages or add it as an additional option on the "Command Line" page. > Although I'm on 64-bit Windows 10, change bin64/sc.ini does not work; > change bin/sc.ini worked. If you want the 64-bit compiler to be used, you have to change the executable search path on the global Tools->Options->Project and Solution->Visual D Settings->DMD directories->Win32/x64/Win32-COFF pages. The compiler picks up the sc.ini in the same folder as the binary.