How to configure vscode code runner from extensions list, click on gear icon. look for code runner executor map for each language edit cpp as -D{your env variable} note it: unix base operating system doesn't require precompilation, they are fasssssst anyway.