Installation on macOS and Ubuntu

Once the clone process is complete, run each of the commands from the following code snippet. If you see a message recommending that you run git pull instead of ./emsdk update, use the git pull command prior to running the ./emsdk install sdk-1.38.15-64bit command:

# Change directory into the EMSDK installation folder
cd emsdk

# Fetch the latest registry of available tools
./emsdk update

# Download and install the latest SDK tools
./emsdk install sdk-1.38.15-64bit

# Make the latest SDK active for the current user (writes ~/.emscripten file)
./emsdk activate sdk-1.38.15-64bit

# Activate PATH and other environment variables in the current Terminal
source ./emsdk_env.sh

The source ./emsdk_env.sh command will activate the environment variables in the current Terminal, which means every time you create a new Terminal instance, you'd have to re-run it. To prevent having to take this step, you can add the following line to your Bash or Zsh configuration file (that is, ~/.bash_profile or ~/.zshrc):

source ~/Tooling/emsdk/emsdk_env.sh > /dev/null

If you installed the EMSDK in a different location, make sure that you update the path to reflect this. Adding this line to your configuration file will run that environment update command automatically so you can start using the EMSDK immediately. To ensure you can use the Emscripten compiler, run this command:

emcc --version

If you see a message with version information, the setup was successful. If you see an error message stating that the command was not found, double-check your configuration. You may have specified an invalid path for the emsdk_env.sh in your Bash or Zsh configuration file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset