I'm using an external class witch I've made myself together with a QT-form, but when I'm running make to compile the program I get errors on “Undefined reference†for every place I'm using the included class. I can't understand why...
The way I've built up the program is that I have a project witch has a form. Inside the form I include my class, TestCls. I know that the file is included. It compiles as long as I just include it(but don't use it), and also classes refered by this class is compiled. I've also seen proof elsewhere that the class is included. But still I get this “undefined reference†everywhere I try to use it.
Here is the code in Form.ui.h:
#include "TestCls.h"
void Form::testSlot(){
TestCls tsst = TestCls();
double nmbr = tsst.getTest();
lineEdit_result->setText(QString::number(nmbr, 'g', 4));
}
Witch gives me “undefined reference†on both the creation of tsst and getTest().
Any suggestions??
Best Regards,
Stian
Bookmarks