I got frustrated with this and ended up building a Ubuntu system which compiles things perfectly.
Compile issue with Emscripten on Windows 7
-
31-05-2022 - |
Question
According to the official documentation, I need to install Python 2.X, Node.js (0.7.3 or above), gcc 4.6, and clang 3.2. And indeed, they are all installed.
Edit: Ok, I've updated this with a much simpler test case, which also fails.
hello.cpp
#include <iostream>
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
My attempt to compile using:
For Google's sake, the error message is:
IOError: [Errno 2] No such file or directory: 'c:\users\jonathan\appdata\local\temp\emscripten_temp_7q2hkb\libcxx\libcxx.bc'
Why is this Emscripten-generated file not available?
Solution
OTHER TIPS
You might not be using the 64-bit version? Or maybe you have to update your ~/.emscripten file ... or maybe Python is just doing weird things... or maybe .. who knows?
I also compiled emscripten on my native Linux with great results. I think emscripten is really meant for native compilers -- not so much ported ones.
Looking at the documentation on http://kripken.github.io/emscripten-site/docs/building_from_source/building_emscripten_from_source_on_windows.html point 3 says you should
Install Visual Studio 2010 (and possibly Microsoft Windows SDK for Windows 7 and .NET Framework 4).
This is to ensure you have the necessary c compilers. There seems to be a common problem of the c compiler settings not being correct on Windows 64-bit.
Microsoft have a compiler download specially for Python 2.7 to address this: Give that a try. If it doesn't work, there are some further steps you may need to take detailed at pyusb 2.7 windows install error