<p dir="auto">MSVC has a max length of 260 chars for input/output paths, which is exceeded when using weave. A possible solution (which I tested and seems to work) is to modify the unique name generation algorithm by making it use md5 hex checksums instead of sha256  (which are 64 characters long). The places where I made the modifications are in catalog.expr_to_filename (<a href="https://github.com/scipy/scipy/blob/master/scipy/weave/catalog.py#L93">https://github.com/scipy/scipy/blob/master/scipy/weave/catalog.py#L93</a>) and platform_info.check_sum (<a href="https://github.com/scipy/scipy/blob/master/scipy/weave/platform_info.py#L99">https://github.com/scipy/scipy/blob/master/scipy/weave/platform_info.py#L99</a>). This is also caused by the fact that the path to the output obj also replicates the whole path of the cpp.</p>
<p dir="auto">The function inline() from scipy.weave store temporarily the compiled files with a filename consisting mainly of a sha256 hash. However Microsoft Visual C++ supports only filename of less than 258 characters including the extension for compilation. Hence the compilation fail. ( <a href="https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2156195-fix-260-character-file-name-length-limitation" rel="nofollow">https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2156195-fix-260-character-file-name-length-limitation</a> ).</p>
<p dir="auto">I can think of two easy solutions to fix the problem:</p>
<ol dir="auto">
<li>
<p dir="auto">Trunk the hash by changin the line<br>
catalog.py:95:  return base + sha256(expr).hexdigest()<br>
to: return base + sha256(expr).hexdigest()[:100]</p>
</li>
<li>
<p dir="auto">Use another hash (md5?sha-1?sha-224?sha-3 224bits?)</p>
</li>
</ol>