vs-tool
vs-tool copied to clipboard
VS on XP can't find emcc.bat for linking
When I try to build my VS 2010 project with the default installation setup, compiles work but links fail with an error like
"Can't find C:/Program"
For some reason the part of VS that invokes the linker is confused by spaces in the path name in $EMSCRIPTEN. I tried both '/' and '' as path separators since when it first failed on XP I was using '' but it was working on Windows 7 which was using '/'. However it fails on XP with either.
My fix has been to set EMSCRIPTEN to the DOS short-form path which does not have spaces with
setx EMSCRIPTEN $(cygpath -d -m "$EMSCRIPTEN")
[You need cygwin to do the above. I have no idea how to obtain the DOS short-form with a Windows command.]
This gives a path like
C:/PROGRA~1/EMSCRI~1/EMSCRI~1/172EFD~1.8
Perhaps the way could be to detect that the current OS is Windows XP and in that case, have python generate short paths for all env. vars that have spaces in them.
Did you have to fix this only for the EMSCRIPTEN env. var so that Visual Studio gets it right, or were there issues with other env. vars/invocations as well?
Only for EMSCRIPTEN and only for the link step and only on Windows XP. It is very strange.