Class recognition error? collect2.exe: error: ld returned 1 exit status

Any time I make a test.cpp object put in a class and then make a header for it and try to run them through my main.cpp after I #include “test.h”, I always seem to get this: collect2.exe: error: ld returned 1 exit status
image
I’m not quite sure as to why it happens. I can still compile everything just fine when all the functions are within my main.cpp file without any issues.

I have grown very frustrated with this, please help!
P.S. atom compiler used is gpp-compiler

Sample code see bellow:

‘main.cpp’:
#include
#include “errcl.h”

int main() {
errcl d;
}

‘errcl.cpp’:
#include “errcl.h”
#include

errcl::errcl()
{
std::cout << “Class by the name of errcl was created.” << ‘\n’;
}

‘errcl.h’:
#include “errcl.h”
#include

errcl::errcl()
{
std::cout << “errcl works.” << ‘\n’;
}

I’d appreciate any sort of help!;
I’ve spent quite a few hours reading about similar issues, but they don’t seem to resolve anything.

1.mingw/bin is within my path
2.The files are all appropriately named, .cpp ,.cpp and .h
3.The include functionality is correctly called in both files.