I have a project with 4 files, ALL of which are stored in the same directory:
main.cpp
test.cpp
test1.cpp
test.h
test and test1 each define functions for two classes declared in test.h (class test and class test1 for example).
All source files contain: #include "test.h"
main, test, and test.h all work properly, but when I added test1, I got an error:
test1 var;
var.function();
error - 'var' was not declared in this scope
however, the object test1 var was successfully created.
This leads me to believe test1 has not been linked to the .h
Does something additional need to be done to link source files, even if they are already in the project?