emsdk 开发环境搭建

emsdk 开发环境搭建

https://emscripten.org/docs/getting_started/Tutorial.html

 

安装cmake

sudo apt install cmake -y

sudo apt install gcc g++ -y


sudo apt-get install default-jre -y

 

git clone https://github.com/juj/emsdk.git --depth=1

cd emsdk

git pull



./emsdk install latest

./emsdk activate latest

source ./emsdk_env.sh


./emsdk install sdk-incoming-64bit binaryen-master-64bit
./emsdk activate sdk-incoming-64bit binaryen-master-64bit

 

添加环境变量

 

 

c


#include <stdio.h>

int main() {
  printf("hello, world!
");
  return 0;
}

 

./emcc tests/hello_world.c

 

node a.out.js

 

./emcc tests/hello_world.c -o hello.html
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » emsdk 开发环境搭建