title: Problems with emscripten (WebAssembly)
body: <p>So I wanted to compile a simple c++ file into js and run it in a web browser. The steps I took (on windows):</p>
  
  <pre><code>git clone https://github.com/emscripten-core/emsdk.git
  cd emsdk
  emsdk install latest
  emsdk activate latest
  emsdk_env.bat --global
  emsdk update-tags
  emcc -v
  </code></pre>
  
  <p>The last command printed:</p>
  
  <pre><code>emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.39.15
  clang version 11.0.0 "
  </code></pre>
  
  <p>Then I tried to compile "hello world" in main.cpp file that looks like:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;emscripten.h&gt;
  int main()
  {
      std::cout&lt;&lt; "hello world!" &lt;&lt; std::endl;
  
      return 0;
  }
  </code></pre>
  
  <p>So then in test folder I used command:</p>
  
  <pre><code>em++ main.cpp -o 1.html
  </code></pre>
  
  <p>which printed:</p>
  
  <pre class="lang-none prettyprint-override"><code>cache:INFO: generating system library: libcompiler_rt.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libcompiler_rt.a" for subsequent builds)
  cache:INFO:  - ok
  cache:INFO: generating system library: libc-wasm.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libc-wasm.a" for subsequent builds)
  cache:INFO:  - ok
  cache:INFO: generating system library: libc++-noexcept.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libc++-noexcept.a" for subsequent builds)
  cache:INFO:  - ok
  cache:INFO: generating system library: libc++abi-noexcept.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libc++abi-noexcept.a" for subsequent builds)
  cache:INFO:  - ok
  cache:INFO: generating system library: libdlmalloc.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libdlmalloc.a" for subsequent builds)
  cache:INFO:  - ok
  cache:INFO: generating system library: libpthread_stub.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libpthread_stub.a" for subsequent builds)
  cache:INFO:  - ok
  cache:INFO: generating system library: libc_rt_wasm.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libc_rt_wasm.a" for subsequent builds)
  cache:INFO:  - ok
  cache:INFO: generating system library: libsockets.a... (this will be cached in "C:\Users\x\.emscripten_cache\wasm\libsockets.a" for subsequent builds)
  cache:INFO:  - ok
  </code></pre>
  
  <p>and as output i got the following files:
  <code>1.html</code>, <code>1.js</code>, <code>1.wasm</code></p>
  
  <p>And when I open <code>1.html</code> I see these errors:</p>
  
  <pre class="lang-none prettyprint-override"><code>both async and sync fetching of the wasm failed
  RuntimeError: abort(both async and sync fetching of the wasm failed) at jsStackTrace@file:///E:/emscripten/emsdk/test/1.js:1952:17
  stackTrace@file:///E:/emscripten/emsdk/test/1.js:1969:16
  abort@file:///E:/emscripten/emsdk/test/1.js:1728:44
  getBinary@file:///E:/emscripten/emsdk/test/1.js:1800:10
  getBinaryPromise/&lt;@file:///E:/emscripten/emsdk/test/1.js:1822:13
  getBinaryPromise@file:///E:/emscripten/emsdk/test/1.js:1821:10
  instantiateArrayBuffer@file:///E:/emscripten/emsdk/test/1.js:1865:12
  instantiateAsync@file:///E:/emscripten/emsdk/test/1.js:1892:14
  createWasm@file:///E:/emscripten/emsdk/test/1.js:1908:3
  @file:///E:/emscripten/emsdk/test/1.js:4990:11
  </code></pre>
  
  <p>I also tried it on linux, but exactly the same errors appear. Older versions of the emscripten SDK don't work either.</p>
  
  <p>Any hints?</p>