One Quickie


Fixing strange duplicate symbols (Random->Random)
While compiling OpenSP, the SGML parser for OpenJade, I got these errors:
ld: multiple definitions of symbol OpenSP::Text::~Text [in-charge]()
Entity.lo definition of OpenSP::Text::~Text [in-charge]() in section (__TEXT,__text)
Group.lo definition of OpenSP::Text::~Text [in-charge]() in section (__TEXT,__text)
ld: multiple definitions of symbol OpenSP::Text::~Text [not-in-charge]()
Entity.lo definition of OpenSP::Text::~Text [not-in-charge]() in section (__TEXT,__text)
Group.lo definition of OpenSP::Text::~Text [not-in-charge]() in section (__TEXT,__text)
Param.lo definition of OpenSP::Text::~Text [in-charge]() in section (__TEXT,__text)
Param.lo definition of OpenSP::Text::~Text [not-in-charge]() in section (__TEXT,__text)
These are caused by the class in question (Text) not having an explicit destructor declared, so the compiler is creating one for us in each of the files. In Text.cxx, add
Text::~Text() { }
and in Text.h, add
~Text();
to the Text class. (I got it to compile and link, so I didn't go back to check to see if just sticking ~Text() {} in Text.h would work.)



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com