buggins/dlangui

After building, the application does not start.

Milldi opened this issue · 7 comments

OS: Win 10 x64
DMD 2.100.0

C:\D\dlangui\examples\example1>dub run
Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86_64.
bindbc-loader 1.0.1: target for configuration "noBC" is up to date.
bindbc-freetype 1.0.3: target for configuration "dynamic" is up to date.
bindbc-opengl 1.0.2: target for configuration "dynamic" is up to date.
bindbc-sdl 1.0.1: target for configuration "dynamic" is up to date.
inilike 1.2.1: target for configuration "library" is up to date.
isfreedesktop 0.1.1: target for configuration "library" is up to date.
xdgpaths 0.2.5: target for configuration "library" is up to date.
icontheme 1.2.3: target for configuration "library" is up to date.
dlangui 0.9.187+commit.4.gc9ccaad2: target for configuration "default" is up to date.
example1 ~master: building configuration "default"...
C:\D\dlangui\src\dlangui\graphics\resources.d(104,8): Deprecation: module std.xml is deprecated - Will be removed from Phobos in 2.101.0. If you still need it, go to https://github.com/DigitalMars/undeaD
C:\D\dlangui\src\dlangui\widgets\styles.d(28,16): Deprecation: module std.xml is deprecated - Will be removed from Phobos in 2.101.0. If you still need it, go to https://github.com/DigitalMars/undeaD
Linking...
To force a rebuild of up-to-date targets, run again with --force.
Copying files for dlangui...
Running bin/example1.exe
Program exited with code -1073741701
C:\D\dlangui\examples\example1>

screenshot
https://cloud.mail.ru/public/2n4U/2og7W1fj6

I have just tested this with 2.100.0-dirty (downloaded 7z from official page), and it runs fine on my end. I'm afraid I'd need more info from you, eg your PC specs, to at least try to understand what's going on.
As a sidenote, can you try building with LDC instead, to see if it makes any difference?

What information is needed about the PC?

Installed DMD on another PC with Win10.
Example 1 build and run successfully.
Compared the received executable files.

Succeeded: There are two files in the bin directory
example1.exe file of 3956224 bytes
libfreetype-6.dll of 1285120 bytes

Failed: There are two files in the bin directory
example1.exe file of 3791872 bytes,
libfreetype-6.dll of 1285120 bytes

In both cases I used dmd from the executable installer (official page) .
dlangui was going like this:
git clone --recursive https://github.com/buggins/dlangui.git
cd dlangui/examples/example1
dub run --build=release

With the help of TotalCommander, I viewed the executable files with the internal "Lister(fileinfo)" utility.
Dependency DLL tab.
Not working requires msvсr120.dll
The worker does not require this dll.

Happened. Example1 started.
I copied msvcr120.dll from the dmd2\windows\bin64 folder to the folder with the executable file example1.
However, it is not clear.
Why is example1 assembled differently on different PCs.

Happened. Example1 started. I copied msvcr120.dll from the dmd2\windows\bin64 folder to the folder with the executable file example1. However, it is not clear. Why is example1 assembled differently on different PCs.

I have been informed that DMD will attempt to link with msvcr if Visual C++ is installed (eg VIsual Studio). If Visual C++ is not available, however, it will revert to mingw. Does one of your systems have Visual Studio installed?

Yes installed. On the second PC, where it worked without problems.

I have thought about it, and the linked library is msvcr120, not msvcrd120 - the debug version. Wouldn't it mean that you just need to install Visual C++ Redistributable to fix this?

Gonna close this for now. If any more issues appear - please open new issue.