Note that I\'m using VS Code on Ubuntu 17.10 and using the GCC Compiler.
I\'m having trouble building a simple program which makes use of additional .ccp files. I\'m
If you have multiple files and one depends on a cpp
file for another, you need to tell g++ to compile it as well, so the linker can find it. The simplest way would be:
$ g++ Cat.cpp main.cpp -o Classes
As a side note, you should probably compile with warnings, minimally -Wall
, likely -Wextra
, and possibly -Wpedantic
, so you know if something you're doing is problematic.