www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dmd install to new Windows 10 system can't run app.d

reply zoujiaqing <zoujiaqing gmail.com> writes:
1. Download dmd.2.088.1.windows.7z
2. Unzip it to D:\Develop\dmd2
3. Add ENV D:\Develop\dmd2\windows\bin to System Path
4. Run `dub --version` and `dmd --version` in powershell is OK
5. dub ini myproject (no dependency)
6. Run `cd myproject` and `dub run` is error...

Error Logging infomation:

PS D:\projects\myproject> dub run -v
Using dub registry url 'https://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at 
C:\ProgramData\dub\packages\local-packages.json
Looking for local package map at 
C:\Users\zouji\AppData\Local\dub\packages\local-packages.json
Note: Failed to determine version of package myproject at .. 
Assuming ~master.
Refreshing local packages (refresh existing: false)...
Looking for local package map at 
C:\ProgramData\dub\packages\local-packages.json
Looking for local package map at 
C:\Users\zouji\AppData\Local\dub\packages\local-packages.json
Refreshing local packages (refresh existing: false)...
Looking for local package map at 
C:\ProgramData\dub\packages\local-packages.json
Looking for local package map at 
C:\Users\zouji\AppData\Local\dub\packages\local-packages.json
Generating using build
Configuring dependent myproject, deps:
Performing "debug" build using 
D:\Develop\dmd2\windows\bin\dmd.exe for x86_64.
myproject ~master: target for configuration "application" is up 
to date.
Using existing build in 
D:\projects\myproject\.dub\build\application-debug-windows-x86_64-dmd_2088-7987457E14148EF60F863BFBCDFB8A1F\.
Copying target from 
D:\projects\myproject\.dub\build\application-debug-windows-x86_64-dmd_2088-7987457E14148EF60F863BFBCD
B8A1F\myproject.exe to D:\projects\myproject
To force a rebuild of up-to-date targets, run again with --force.
Running .\myproject.exe
Program exited with code -1073741515


I think this problem has a great impact on a new person using D 
language under Windows system.
Nov 21 2019
parent reply Seb <seb wilzba.ch> writes:
On Thursday, 21 November 2019 at 08:30:33 UTC, zoujiaqing wrote:
 1. Download dmd.2.088.1.windows.7z
 2. Unzip it to D:\Develop\dmd2
 3. Add ENV D:\Develop\dmd2\windows\bin to System Path
 4. Run `dub --version` and `dmd --version` in powershell is OK
 5. dub ini myproject (no dependency)
 6. Run `cd myproject` and `dub run` is error...

 [...]
Note this line:
 Running .\myproject.exe
 Program exited with code -1073741515
Your compiled program is crashing. Could you run the compiled binary manually and obtain a stack trace?
Nov 21 2019
next sibling parent zoujiaqing <zoujiaqing gmail.com> writes:
On Thursday, 21 November 2019 at 08:42:39 UTC, Seb wrote:
 On Thursday, 21 November 2019 at 08:30:33 UTC, zoujiaqing wrote:
 1. Download dmd.2.088.1.windows.7z
 2. Unzip it to D:\Develop\dmd2
 3. Add ENV D:\Develop\dmd2\windows\bin to System Path
 4. Run `dub --version` and `dmd --version` in powershell is OK
 5. dub ini myproject (no dependency)
 6. Run `cd myproject` and `dub run` is error...

 [...]
Note this line:
 Running .\myproject.exe
 Program exited with code -1073741515
Your compiled program is crashing. Could you run the compiled binary manually and obtain a stack trace?
I don't install debug tools. but add mscoff flags is OK. PS D:\projects\myproject> cat .\source\app.d import std.stdio; void main() { writeln("Edit source/app.d to start your project."); } PS D:\projects\myproject> dub run --arch=x86_mscoff Performing "debug" build using D:\Develop\dmd2\windows\bin\dmd.exe for x86, x86_mscoff. myproject ~master: target for configuration "application" is up to date. To force a rebuild of up-to-date targets, run again with --force. Running .\myproject.exe Edit source/app.d to start your project.
Nov 21 2019
prev sibling next sibling parent zoujiaqing <zoujiaqing gmail.com> writes:
On Thursday, 21 November 2019 at 08:42:39 UTC, Seb wrote:
 Note this line:

 Running .\myproject.exe
 Program exited with code -1073741515
Your compiled program is crashing. Could you run the compiled binary manually and obtain a stack trace?
x86 is OK, but x64 bad. PS D:\projects\myproject> dub run --arch=x86 Performing "debug" build using D:\Develop\dmd2\windows\bin\dmd.exe for x86. myproject ~master: building configuration "application"... Linking... Running .\myproject.exe Edit source/app.d to start your project.
Nov 21 2019
prev sibling parent reply zoujiaqing <zoujiaqing gmail.com> writes:
On Thursday, 21 November 2019 at 08:42:39 UTC, Seb wrote:
 Note this line:

 Running .\myproject.exe
 Program exited with code -1073741515
Your compiled program is crashing. Could you run the compiled binary manually and obtain a stack trace?
Install msvcr100.dll for x64 the question is solved, thanks! https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe
Nov 21 2019
parent JN <666total wp.pl> writes:
On Thursday, 21 November 2019 at 09:26:39 UTC, zoujiaqing wrote:
 On Thursday, 21 November 2019 at 08:42:39 UTC, Seb wrote:
 Note this line:

 Running .\myproject.exe
 Program exited with code -1073741515
Your compiled program is crashing. Could you run the compiled binary manually and obtain a stack trace?
Install msvcr100.dll for x64 the question is solved, thanks! https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe
I had the same issue a while ago and reported it here https://issues.dlang.org/show_bug.cgi?id=20061
Nov 21 2019