问题
I tried to run my C++ program using g++ but am getting following exception: "typeinfo for ocl::CRException" am using ocl namespace containing CRException class.. Please, help me on this.
Here is the code where am including OCL classes :
#ifndef VOIDSOFT_ADA2_LIND_HH
#define VOIDSOFT_ADA2_LIND_HH
#include <string>
#include <list>
#include <queue>
#include <map>
#include <ocl.h>
#include "threaded.hh"
using namespace std;
using namespace ocl;
class circuit;
class Lind: public Threaded
{
public:
typedef int lookup_t;
private:
OraConnection connection;
pthread_mutex_t *done_m;
queue<pthread_t> *q;
lookup_t type;
public:
circuit *c;
Lind();
~Lind();
void *run();
map<string, pair<string, string> > *getnodes(string);
bool connect();
void disconnect();
private:
circuit *getcircuitinfo(string, circuit *c = 0);
void bindInStr(OraQuery &q, string arg, string bindvar, map<string, string> *properties);
map<string, pair<string, string> > *node2name(string);
};
/* Lookup types */
namespace LindLookupTypes {
/* Get overlying */
const int OL = 0x001;
/* Get underlying */
const int UL = 0x002;
}
#endif /* VOIDSOFT_ADA2_LIND_HH */
回答1:
It usually means you forgot to define (implement) a virtual method somewhere. Check that all virtual methods of ocl::CRException
are defined and that the object file where they are defined is actually linked to your code.
If it doesn't help, edit the answer and show us the code for CRException
.
来源:https://stackoverflow.com/questions/15640215/typeinfo-for-oclcrexception