I have three different files for the test class I am trying to use.. The first one will be the main prog7.cpp, the second one with be the implementation, gameclass1.cpp and the third the header, gameclass1.hpp
I am getting a weird linker error and have no idea why. All I'm trying to do is a simple output before I start the actual program and it's not working.
Main:
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
#include "gameclass1.hpp"
usingnamespace std;
int main(){
Test object;
return 0;
}
Undefined symbols for architecture x86_64:
"Test::Test()", referenced from:
_main in prog7-5c1bd1.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)