我尝试使用g ++运行我的C ++程序,但得到下面的异常: typeinfo for ocl :: CRException使用包含CRException类的ocl命名空间..请帮助我
这里是包含OCL类的代码:
#ifndef VOIDSOFT_ADA2_LIND_HH #define VOIDSOFT_ADA2_LIND_HH #include< string> #include< list> #include< queue> #include< map> #include< ocl.h> #includethreaded.hh using namespace std; 使用名称空间ocl; 级电路; $ b $ class Lind:public Threaded { public: typedef int lookup_t; 私有: OraConnection连接; pthread_mutex_t * done_m; 队列< pthread_t> * Q; lookup_t类型; public: circuit * c; Lind(); 〜Lind(); void * run(); map< string,pair< string,string> > * getnodes(字符串); 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(字符串); }; $ b $ *查找类型* / 名称空间LindLookupTypes { / *覆盖* / const int OL = 0x001; / *获取底层* / const int UL = 0x002; } #endif / * VOIDSOFT_ADA2_LIND_HH * /解决方案这通常意味着你忘了在某处定义(实现)一个虚拟方法。检查 ocl :: CRException 的所有虚拟方法都已定义,并且定义它们的对象文件实际上与您的代码链接。
如果没有帮助,请编辑答案并向我们显示 CRException 的代码。
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 */解决方案
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.
更多推荐
Typeinfo for ocl :: CRException
发布评论