www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dub build doesn't work

reply OiseuKodeur <oiseaukodeur gmail.com> writes:
Hello, i am having a problem with dub build with this project 
https://github.com/OiseauKodeur/cervelet/tree/master/source

when i try to compile everything go well but when i click to run 
the .exe it give my an error missing msvcr100.dll, but with rdmd 
the program run fine
Oct 22 2019
next sibling parent Justin Stephens <jstephens2020 outlook.com> writes:
On Tuesday, 22 October 2019 at 22:14:02 UTC, OiseuKodeur wrote:
 Hello, i am having a problem with dub build with this project 
 https://github.com/OiseauKodeur/cervelet/tree/master/source

 when i try to compile everything go well but when i click to 
 run the .exe it give my an error missing msvcr100.dll, but with 
 rdmd the program run fine
Hi. The link you provided is invalid (is your repository private?), but I'll try my best to help. This is a problem with your system being unable to locate "msvcr100.dll", which it needs to load for your application. From what I have found from a quick search, this .dll is a part of Microsoft Visual C++. You should try installing Visual C++ and see if that solves the problem. Best
Oct 22 2019
prev sibling next sibling parent reply Seb <seb wilzba.ch> writes:
On Tuesday, 22 October 2019 at 22:14:02 UTC, OiseuKodeur wrote:
 Hello, i am having a problem with dub build with this project 
 https://github.com/OiseauKodeur/cervelet/tree/master/source

 when i try to compile everything go well but when i click to 
 run the .exe it give my an error missing msvcr100.dll, but with 
 rdmd the program run fine
Did you try compiling with LDC? Their Windows support is better maintained. Anyhow, so what's happening is that dmd by default uses the digitalmars C runtime (32-bit only) whereas dub will use the llvm linker (64-bit) by default. Now llvm's linker searches for the Microsoft C runtime and can't find it. Hence, the error which you're receiving. You won't need Visual Studio for this, but something which ships msvcr100.dll. So sth. like this should be enough: https://www.microsoft.com/en-us/download/details.aspx?id=5555 BTW if you prefer using optlink and the digitalmars C runtime, you can instruct dub to do so with: --arch=x86
Oct 22 2019
next sibling parent reply OiseuKodeur <oiseaukodeur gmail.com> writes:
On Wednesday, 23 October 2019 at 06:40:47 UTC, Seb wrote:
 On Tuesday, 22 October 2019 at 22:14:02 UTC, OiseuKodeur wrote:
 Hello, i am having a problem with dub build with this project 
 https://github.com/OiseauKodeur/cervelet/tree/master/source

 when i try to compile everything go well but when i click to 
 run the .exe it give my an error missing msvcr100.dll, but 
 with rdmd the program run fine
Did you try compiling with LDC? Their Windows support is better maintained. Anyhow, so what's happening is that dmd by default uses the digitalmars C runtime (32-bit only) whereas dub will use the llvm linker (64-bit) by default. Now llvm's linker searches for the Microsoft C runtime and can't find it. Hence, the error which you're receiving. You won't need Visual Studio for this, but something which ships msvcr100.dll. So sth. like this should be enough: https://www.microsoft.com/en-us/download/details.aspx?id=5555 BTW if you prefer using optlink and the digitalmars C runtime, you can instruct dub to do so with: --arch=x86
even when i installed the latest vcredist_x86 it doesn't work, but using --arch=x86 it works, but only when i don't include dlangui in the dub.json, it give me another error https://i.imgur.com/f1Rvlg1.png (app.d line 21 "code = stdin.readln();" and line 7 is "void main(string[] arguments)"), so i maybe need to find a new gui library, and thanks now at least i can compile.
Oct 23 2019
parent reply kinke <noone nowhere.com> writes:
On Wednesday, 23 October 2019 at 16:55:37 UTC, OiseuKodeur wrote:
 On Wednesday, 23 October 2019 at 06:40:47 UTC, Seb wrote:
 You won't need Visual Studio for this, but something which 
 ships msvcr100.dll.
 So sth. like this should be enough:

 https://www.microsoft.com/en-us/download/details.aspx?id=5555
even when i installed the latest vcredist_x86 it doesn't work
You don't need the *latest* VC runtime (2019), but 2010, i.e., Seb's link. For DMD that is, LDC should be fine with the latest one.
Oct 23 2019
parent OiseuKodeur <oiseaukodeur gmail.com> writes:
On Wednesday, 23 October 2019 at 18:37:10 UTC, kinke wrote:
 On Wednesday, 23 October 2019 at 16:55:37 UTC, OiseuKodeur 
 wrote:
 On Wednesday, 23 October 2019 at 06:40:47 UTC, Seb wrote:
 You won't need Visual Studio for this, but something which 
 ships msvcr100.dll.
 So sth. like this should be enough:

 https://www.microsoft.com/en-us/download/details.aspx?id=5555
even when i installed the latest vcredist_x86 it doesn't work
You don't need the *latest* VC runtime (2019), but 2010, i.e., Seb's link. For DMD that is, LDC should be fine with the latest one.
Yes that's the one i downloaded
Oct 23 2019
prev sibling parent reply OiseuKodeur <oiseaukodeur gmail.com> writes:
 BTW if you prefer using optlink and the  digitalmars C runtime, 
 you can instruct dub to do so with: --arch=x86
how can i add --arch=x86 flag to the dub.json so it do it automatically ?
Oct 23 2019
parent welkam <wwwelkam gmail.com> writes:
On Thursday, 24 October 2019 at 01:17:24 UTC, OiseuKodeur wrote:
 BTW if you prefer using optlink and the  digitalmars C 
 runtime, you can instruct dub to do so with: --arch=x86
how can i add --arch=x86 flag to the dub.json so it do it automatically ?
"dflags": [ "--arch=x86" ] This should work. Didnt tried though
Oct 24 2019
prev sibling parent reply SrMordred <patric.dexheimer gmail.com> writes:
On Tuesday, 22 October 2019 at 22:14:02 UTC, OiseuKodeur wrote:
 Hello, i am having a problem with dub build with this project 
 https://github.com/OiseauKodeur/cervelet/tree/master/source

 when i try to compile everything go well but when i click to 
 run the .exe it give my an error missing msvcr100.dll, but with 
 rdmd the program run fine
I got into this recently too. I have the latest VS and redistributable packages installed and was unable to find msvcr100.dll too. Which is very odd. Lucky I found it on another software installed on my PC.
Oct 23 2019
parent OiseuKodeur <oiseaukodeur gmail.com> writes:
On Wednesday, 23 October 2019 at 22:06:28 UTC, SrMordred wrote:
 On Tuesday, 22 October 2019 at 22:14:02 UTC, OiseuKodeur wrote:
 Hello, i am having a problem with dub build with this project 
 https://github.com/OiseauKodeur/cervelet/tree/master/source

 when i try to compile everything go well but when i click to 
 run the .exe it give my an error missing msvcr100.dll, but 
 with rdmd the program run fine
I got into this recently too. I have the latest VS and redistributable packages installed and was unable to find msvcr100.dll too. Which is very odd. Lucky I found it on another software installed on my PC.
which software ?
Oct 23 2019