0

我尝试使用 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>
#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 */
4

1 回答 1

0

这通常意味着您忘记在某处定义(实现)虚拟方法。检查ocl::CRException是否定义了所有虚拟方法,以及定义它们的目标文件是否实际链接到您的代码。

如果没有帮助,请编辑答案并向我们展示CRException.

于 2013-03-26T15:10:53.280 回答