Well, it's really strange what's happening to me, but I'll try to make it clear. I have a class and in one method I decide to put a throw (in hpp definition and in cpp implementation). so I have my method that can throw a std::exception. Here no problem.
I create an exception of mine:
class MyException : public std::exception {
public:
MyException() throw();
~MyException() throw();
const char what() const throw();
}
ok, let's use it in my methods from:
class myclass {
void mymethod() throw(std::exception);
}
To:
class myclass {
void mymethod() throw(MyException); // I have included hpp file where MyException is defined
}
OK! this is what I get
/tmp/ccwSS5GE.o:(.gcc_except_table+0x84): undefined reference to 'typeinfo for MyException' collect2: ld returned 1 exit status
WHY?? With std::exception everything works fine, now nothing works fine.