原文链接: emsdk 开发环境搭建

上一篇: multipass 使用vscode 开发

下一篇: fish ubuntu 上的设置

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

添加环境变量

up-fb64eec252e6fcdb0e68a3a846868180d11.png

c


#include <stdio.h>

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

./emcc tests/hello_world.c

node a.out.js

./emcc tests/hello_world.c -o hello.html

编译那个webp的库

https://my.oschina.net/ahaoboy/blog/4478721

up-c1ba43ca405de18386491a73937e5157117.png

Logo

一站式 AI 云服务平台

更多推荐