September 2018
Intermediate to advanced
328 pages
9h 10m
English
If you prefer not to use VS Code, you can use a Makefile to accomplish the same goal as the VS Code tasks. Create a file named Makefile in your project folder and populate it with the following contents (make sure that the file is using tabs, not spaces):
# This allows you to just run the "make" command without specifying# arguments:.DEFAULT_GOAL := build# Specifies which files to compile as part of the project:CPP_FILES = $(wildcard src/*.cpp)# Flags to use for Emscripten emcc compile command:FLAGS = -std=c++14 -O3 -s WASM=1 -s USE_SDL=2 -s MODULARIZE=1 \ --bind $(CPP_FILES)# Name of output (the .wasm file is created automatically):OUTPUT_FILE = public/index.js# This is the target that compiles our executablecompile: ...
Read now
Unlock full access