Setting up VSCode
- Install GCC, gdb, and cmake
sudo apt-get update
sudo apt-get install build-essential gdb cmake
- Check
gcc
andcmake
versions.
jpt@100834-pc:~/git/cpp_trial$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
...
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
jpt@100834-pc:~/git/cpp_trial/build$ cmake --version
cmake version 3.16.3
- Install
homebrew
brew install cmake gdb
This uses cmake
to create a make file. See the CMakeLists.txt
for instructions on how the make file is generated.
git clone XXXX
cd cpp_boilerplate
- Download Eigen 3.4.0
- Untar and get only the
Eigen
folder insideeigen-3.4.0
and that put inexternal_include
folder. cd .. && mkdir build
cd build
cmake ..
make
- run
./my_program ../data/load.csv
I have included a launch.json
and tasks.json
in the .vscode
folder. Launch sets up the program to run and tasks include the pre launch tasks it must execute. This includes running cmake
with the debug flag.