Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

VS on XP can't find emcc.bat for linking #24

Open
MarkCallow opened this issue Nov 25, 2013 · 2 comments
Open

VS on XP can't find emcc.bat for linking #24

MarkCallow opened this issue Nov 25, 2013 · 2 comments

Comments

@MarkCallow
Copy link

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:/PROGRA1/EMSCRI1/EMSCRI1/172EFD1.8

@juj
Copy link
Owner

juj commented Nov 26, 2013

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?

@MarkCallow
Copy link
Author

Only for EMSCRIPTEN and only for the link step and only on Windows XP. It is very strange.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants