If you implement class methods in somefile.cpp and your program is in otherfile.cpp you need to compile it by g++ somefile.cpp otherfile.cpp ....
Linker error means that you included all headers you need, but you didn't compile definition of some functions.
The best way to compile more complex projects is through Makefile.
Example Makefile:
all: main
main: main.cpp blue.o
g++ main.cpp blue.o -o main
blue.o: blue.cpp blue.h
g++ blue.cpp -c -o blue.o
Then you can compile your project by command make
This makefile says that your projects needs main, main depends on main.cpp and blue.o. So if main.cpp or blue.o is not actual it would tries to make both of them and then main, by command g++ main.cpp blue.o -o main.
Then, blue.o depends on blue.cpp and blue.h. Blue would be compiled to object file blue.o.