I am able to use Linux command line to build a cppfront hello world program with g++-12. I have installed VS Code with 'cpp2 (cppfront) Syntax Highlighting v0.0.2' & 'C/C++ Extension Pack v1.3.0' extensions.
I'm looking to build and run this example and other programs within VS Code on Linux. How can I build and run cppfront programs with g++-12 (which is not the default installed version of g++) within VS Code?
Input for hw.cpp2
program build:
3rd/
cppfront/
include/
cpp2util.h
inc/
src/
hw.cpp2
main: () = std::cout << "Hello, world\n";
Intermediate build results (only needed during build not for deliverable product files).
tmp/
hw.cpp
#include "cpp2util.h"
auto main() -> int;
auto main() -> int { std::cout << "Hello, world\n"; }
Exportable build results:
exp/
hw
I would expect VS Code to handle new .cpp2
files in src/
w/o having to manually add each one to some configuration file.