Here is a small piece of my interface file mpe.i:
%module MpeExceptionI
%include java\std_except.i
%{
#include "MpeApi.h"
%}
namespace MpeApi
{
class MpeException : public runtime_error
{
public:
MpeException (const string& what, Result result = MMA_FAILURE);
Result GetResult ();
private:
Result m_result;
};
}
When I run SWIG as follows:
swig -c++ -java mpe.i
I get an error message:
mpe.i(10): Warning(401): Nothing known about base class 'runtime_error'. Ignored.
From what I can tell, std_except.i includes <stdexcept>, and this is where runtime_error is defined.
What am I doing wrong?
Thanks!