Getting DUB to work with VS 2017

Enjoys Math via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 22 08:39:39 PDT 2017


On Monday, 22 May 2017 at 06:44:27 UTC, Rainer Schuetze wrote:
>
>
> On 22.05.2017 03:54, Enjoys Math wrote:
> [...]
>> C:\Users\Gabe\AppData\Roaming\dub\packages\pyd-0.9.9\pyd\\infrastructure\windows\python27_digitalmars.lib+
>> 
>> user32.lib+
>> kernel32.lib/NOMAP/CO/NOI/DELEXE
>> LINK : fatal error LNK1181: cannot open input file 
>> 'obj\debug\dummy\dummy\dummy\dummy\dummy\dummy\dummy\pegparser\..\source\led_ux_grammar.obj+'
>> 
>> Building 
>> C:\Users\Gabe\Dropbox\MyProjects\___SOUND_UNITED\LED_UX_Designer\lang\PEGparser\PEGparser.exe failed!
>> Details saved as 
>> "file://C:\Users\Gabe\Dropbox\MyProjects\___SOUND_UNITED\LED_UX_Designer\lang\PEGparser\.dub\obj\debug\dummy\dummy\dummy\dummy\dummy\dummy\dummy\pegparser\pegparser.buildlog.html"
>> 
>> ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 
>> skipped ==========
>
> This looks like the wrong link.exe has been found in path. When 
> building for Win32/x86 the default is to use optlink that is 
> installed with dmd. The error message is issued by MS link 
> instead.
>
> I suspect the DMD installation folder is not set correctly 
> (check Tools->Options->Projects and Solutions->Visual D 
> Settings->DMD directories). Please also check the executable 
> search paths below, they should include 
> "$(DMDInstallDir)windows\bin". There was a bug in Visual D 
> 0.44.0 where a bad character sneaked into the path to DMD's bin 
> folder.
>
> > Opening any of the dub.json files with red X's opens them,
> but then immediately crashes VS.
>
> The red cross means it's not part of the build, so that's 
> correct.
>
> The crash is not ok. I can reproduce it, seems to happen due to 
> a function not being implemented (which seems fine for other 
> files).


Thank you.  That fixed it.  Simply removing the dub.json files 
from the project is a temporary solution to the crashes.  
However, the entire directory under pegged.examples is red X's.  
So to temp fix that, remove whole directory, add new filter 
(folder) 'examples', and add the example you need by copy / 
pasting text from another install of Pegged (so you can find it 
on disk), from the example grammar you need.  E.g. I added new 
item `c.d` under new folder `examples`, then copy / pasted the 
contents of `c.d` from a 2nd install of pegged.  The red X goes 
away, and I am able to use the grammar.

Alternatively, simply add the new file `c.d` to your 
project/source folder.


More information about the Digitalmars-d-learn mailing list