After installing and configuring the EMSDK, you'll need to test it to ensure you're able to generate Wasm modules from C/C++ code. The easiest way to test it is to compile some code using the emcc command and try running it in a browser. In this section, we'll validate the EMSDK installation by writing and compiling some simple C code and evaluating the Wat associated with the .wasm output.
Testing the compiler
The C code
We'll use some very simple C code to test our compiler installation. We won't need to import any headers or external libraries. We won't use C++ for this test because we need to perform an extra step with C++ to prevent name mangling, which we'll describe in greater detail...