"Undefined Symbols" when inheriting from stdexcept classes

Posted by Austin Hyde on Stack Overflow See other posts from Stack Overflow or by Austin Hyde
Published on 2010-03-16T23:56:31Z Indexed on 2010/03/17 0:01 UTC
Read the original article Hit count: 356

Filed under:
|
|
|

Here is an exception defined in <stdexcept>:

class length_error : public logic_error 
{
public:
    explicit length_error(const string&  __arg);
};

Here is my exception:

class rpn_expression_error : public logic_error
{
public:
    explicit rpn_expression_error(const string& __arg);
};

Why do I get this error when <stdexcept> does not?

Undefined symbols:
  rpn_expression_error::rpn_expression_error(/*string*/ const&), referenced from:
        ...
ld: symbol(s) not found

© Stack Overflow or respective owner

Related posts about c++

Related posts about exceptions