For an assignment I created a fractions class that overloads many operators. I then converted it into a dll to be used by another program. The issue I am having is that when I try to use the non-member operators I get the error "undefined reference to 'operator+'".
I believe I have implemented the dll correctly as the constructors works correctly as do any member functions/operators. Just the non-member operators are giving me this issue.
Fraction frac1(1,5); //No errors
Fraction frac2(2,5); //No errors
Fraction frac3 = frac2 + frac1; //ERROR: undefined reference to 'operator+'
//Note: + operator is a non-member operator
frac2 += frac1; //No errors and is a member operator
I've been trying to solve this and googling for hours with no success. It could possible be a linking issue but I have had no luck figuring that out if so.
I'm using Qt Creator (since I am implenting a GUI) and MinGW.