I declare an obj :
#include "abc.h"
class xxx
{
public:
xxx();
~xxx();
abc* q;
...
};
in the .cpp file i do the following
this->q=new abc(); <-error on this line with undefined reference to abc::abc()
In the console it also appears this error:
Dwarf Error: Offset (76195) greater than or equal to .debug_str size
(1472).
anyone knows what could be wrong? i’m using eclipse, fedora 14
It is an Linking error which tells you that the linker could not find the definition for
abc::abc().Most likely, You only declared but did not define the no argument constructor for class
abc.In your
cppfile you should have:If you already have it in place then, You should ensure that the source cpp file which has this definition is being properly linked to your project.