www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ide - Visual D optilink issue

reply Illuminati <Joe Masons.com> writes:
I have been getting this issue quite often lately. It just 
started happening for for some reason. It happens about every 5 
builds:

OPTLINK : Error 3: Cannot Create File Win32\Debug DMD\test.map

If I immediately build afterwards, it works. I have added `.map` 
to the clean files option.

I have tried with the VS debugger and mago. I thought it 
initially started when I switched to the VS debugger so I 
switched back to mago but it continued.

I also might have changed some settings somewhere such as 
creating a "full" map file. Not quite sure what started it all. 
Seems like a bug regardless since it rebuilds fine most of the 
time(with no source changes).

Any ideas?
Sep 02 2016
parent Rainer Schuetze <r.sagitario gmx.de> writes:
On 02.09.2016 21:43, Illuminati wrote:
 I have been getting this issue quite often lately. It just started
 happening for for some reason. It happens about every 5 builds:

 OPTLINK : Error 3: Cannot Create File Win32\Debug DMD\test.map

 If I immediately build afterwards, it works. I have added `.map` to the
 clean files option.

 I have tried with the VS debugger and mago. I thought it initially
 started when I switched to the VS debugger so I switched back to mago
 but it continued.

 I also might have changed some settings somewhere such as creating a
 "full" map file. Not quite sure what started it all. Seems like a bug
 regardless since it rebuilds fine most of the time(with no source changes).

 Any ideas?
The map file should not be affected by debugger settings. One issue with rewriting generated files is that a virus checker might still be accessing the file and forbid recreation. I usually exclude my development folder from realtime virus protection as it can also cause some serious slowdown. You might also reduce the chance of this happening by selecting the "Minimal" map file. I should add an option to disable it altogether, though. If you tweaked the map file settings, you are likely to look at it with some file viewer. Maybe this one is blocking rewriting the file? Another idea: optlink doesn't always treat file names with spaces correctly, maybe you can avoid that. That should fail more predictably, though.
Sep 03 2016