Re: Setup help?
On Thursday, 7 February 2019 at 02:55:15 UTC, evilrat wrote: You need C++ tools from Microsoft to debug D code, don't mind the name, its debugger works for any (compatible formats) native code. Then add C++ Windows debug configuration and set your paths. Done. You can debug now. (Though it is possible that it will require Visual Studio Build Tools installation) Of course this will not work for default DMD builds because it is using ancient object files format that is not compatible with VS debugger engine, so using DMD you need to build with -m32mscoff (dub --arch=x86_mscoff) or -m64 (dub --arch=x86_64) flags. Thanks, I'll give it a shot.
Re: Setup help?
On Wednesday, 6 February 2019 at 23:59:07 UTC, Charles wrote: I don't use C++, and I do use Windows, which has me wondering if I'm just missing some normal/exepcted configuration. My most recent attempt I tried to get Native Debug to make VS Code debugging stop on the first line. Instead, it just runs the program, and exits. "Native Debug" is for GDB and looks like it doesn't even works on Windows. But even on Linux I found that C++ tools are much nicer. You need C++ tools from Microsoft to debug D code, don't mind the name, its debugger works for any (compatible formats) native code. Then add C++ Windows debug configuration and set your paths. Done. You can debug now. (Though it is possible that it will require Visual Studio Build Tools installation) Of course this will not work for default DMD builds because it is using ancient object files format that is not compatible with VS debugger engine, so using DMD you need to build with -m32mscoff (dub --arch=x86_mscoff) or -m64 (dub --arch=x86_64) flags.
Setup help?
Does anyone know of a video that shows setting up vscode (or another editor with debugging support)? I always feel like I miss a step when I decide to try D out again, and it never ends well. I don't use C++, and I do use Windows, which has me wondering if I'm just missing some normal/exepcted configuration. My most recent attempt I tried to get Native Debug to make VS Code debugging stop on the first line. Instead, it just runs the program, and exits. Debug console output: No symbol table is loaded. Use the "file" command. Running executable [New Thread 10256.0x23d8] [New Thread 10256.0x2d30] [New Thread 10256.0xebc] [New Thread 10256.0x19f4] Edit source/app.d to start your project. [Thread 10256.0xebc exited with code 0] [Thread 10256.0x2d30 exited with code 0] [Thread 10256.0x19f4 exited with code 0] Thanks
Re: newbie windows setup help (path settings seem correct) fixed
> > Changed directories back to: > dmd2\windows\bin > dmd2\windows\lib > dmd2\src > fixed. Thank you for your help. Robert Smith
Re: newbie windows setup help (path settings seem correct)
if you moved your bin and lib directories from dmd2\windows\bin dmd2\windows\lib dmd2\src to dmd\bin dmd\lib dmd\src then you have some extra \..\ 's in your sc.ini file. If that's the problem, try removing those so your sc.ini file looks like this: [Version] version=7.51 Build 020 [Environment] LIB="%@P%\..\lib";\dm\lib DFLAGS="-I%@P%\..\src\phobos" "-I%@P%\..\src\druntime\import" LINKCMD=%@P%\link.exe OR you could get a clean installation of dmd2 and change one line in your bat file from @SET PATH=%PATH%;\D\dmd\bin to @SET PATH=%PATH%;\D\dmd2\windows\bin bye
Re: newbie windows setup help (path settings seem correct)
Thanks for the reply. Yes, I have the path set with a batch file that opens a command window. A "dmd" command in this window displays the dmd usage help: "DMD32 D Compiler v2.053..." and a "link" command displays: "OPTLINK (R) for Win32..." What kind of build helper is available for Win32? Robert Smith
Re: newbie windows setup help
Robert Smith: > I am attempting to compile a simple d source file using the > http://learn-programming.za.net/learn_d_programming.html site as a guide to > learning D programming. > dmd2 is installed in D:\D\dmd. Installing DMD on Windows is very easy: 1) Download the latest compiler, like dmd 2.053. 2) Unzip it into a short nice path. D:\D\dmd is OK. 3) Add the path to the windows\bin in your system path. This means adding this at the end your path: ;D:\D\dmd\windows\bin; Do you know how to add that to the system path? Then some kind of build helper is useful. Bye, bearophile
newbie windows setup help
I am attempting to compile a simple d source file using the http://learn-programming.za.net/learn_d_programming.html site as a guide to learning D programming. dmd2 is installed in D:\D\dmd. When I attempt to compile I get the following error: D:\D\programs>dmd first.d object.d: Error: module object is in file 'object.d' which cannot be read import path[0] = D:\D\dmd\bin\..\..\src\phobos import path[1] = D:\D\dmd\bin\..\..\src\druntime\import contents of sc.ini: [Version] version=7.51 Build 020 [Environment] LIB="%@P%\..\lib";\dm\lib DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" LINKCMD=%@P%\link.exe I cannot install dmd to the C: drive. What is the significance of the line: "DFLAGS="-I%@P%\..\..\src\phobos"" since there is no "src" folder? I really like what I have read about D and would like to learn the language. Thanks for any help. Bob Smith