我尝试使用 g++ 运行我的 C++ 程序,但出现以下异常:“ocl::CRException 的 typeinfo” 我正在使用包含 CRException 类的 ocl 命名空间。请帮我解决这个问题。
这是包含 OCL 类的代码:
#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 */
这通常意味着您忘记在某处定义(实现)虚拟方法。检查 ocl::CRException
的所有虚拟方法均已定义,并且定义它们的对象文件实际上已链接到您的代码。
如果没有帮助,请编辑答案并向我们展示 CRException
的代码。
我是一名优秀的程序员,十分优秀!