"main.h"??? <-- Obviously something wrong here.
Well, if there's something that won't compile, the compiler won't get to anything else after that error.
If I want to use testfunction from main it brings an error that no such function exists. But I am sure that testfunction.cpp is also getting compiled because if I add an error there I will get an compile error.
Be sure to use this with all your source files:
/* Your source file */
*make* files would teach you a good way of keeping track of dependencies...
wherever main is needs (#include "testfunction.cpp")
testfunction.cpp needs(#include "testfunction.h")
testfunction.h needs no other dependencies.