git clone https://github.com/emscripten-core/emsdk.git cd ./emsdk git pull
./emsdk install latest ./emsdk activate latest
emsdk_env.bat
检验是否安装成功, 新打开一个终端执行
1 2 3 4 5
emcc --version emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.36 (518d9fea335f7cd2b5771e43df76e0535c6df5dd) Copyright (C) 2014 the Emscripten authors (see AUTHORS.txt) This is free and open source software under the MIT license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.
(this may also be due to not including full filesystem support - try building with -sFORCE_FILESYSTEM)
提示要在输出后加上换行符
1 2 3 4 5 6
#include <stdio.h>
int main () { + printf("🌈Hello World!\n"); return 0; }