Hi guys,
So I gather an undefined reference has to do with not being able to find a definition. However I’ve checked my program dozens of times and I can’t figure out what is wrong.
myFirstClass.cpp :
#include "myFirstClass.h"
myFirstClass::myFirstClass(){
this.myInt = 15;
}
myFirstClass.h :
#include "ofMain.h"
class myFirstClass{
public :
myFirstClass();
int myInt;
};
In the public section of testApp.h :
myFirstClass myFirstClassTest;
in my testApp.cpp draw() function :
myFont.drawString(ofToString(myFirstClassTest.myInt),400,200);
I get undefined reference to ‘myFirstClass::myFirstClass()’ .
myFirstClass.cpp and myFirstClass.h are located in the /src folder of the app.
I really can’t find what’s wrong