If you haven't already done so, create a folder that will contain the code samples we'll be working through (the examples use the name book-examples). Open this folder in VS Code, press the F1 key, and select C/Cpp: Edit Configurations⦠to create a .vscode/c_cpp_properties.json file in the root of your project. It should open the file automatically. Add the following line to the browse.path array: "${env:EMSCRIPTEN}/system/include". This will prevent errors being thrown if you include the emscripten.h header. You may need to manually create the browse object with a path entry if it didn't generate one automatically. The following snippet represents the updated configuration file on Ubuntu:
{
"name": "Linux",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceFolder}",
"${env:EMSCRIPTEN}/system/include"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}