各位老鸟:
我定义了一个工厂类
#pragma once
#include "stdafx.h"
#include "PbxCommandDecorator.h"
#include "PbxCommandForAvaya.h"
#include "PbxCommandAbstractFactory.h"
class PbxCommandFactory : public PbxCommandAbstractFactory
{
public:
PbxCommandFactory(void);
public:
~PbxCommandFactory(void);
public:
IPbxCommand* GetApiCommandForAvaya()
{
return new PbxCommandDecorator(new PbxCommandForAvaya());
}
};
然后我在项目的主函数里面调用下列语句
PbxCommandAbstractFactory *factory = new PbxCommandFactory();
factory->GetApiCommandForAvaya()->AcsOpenStream(ST_CSTA);报错内容如下:
错误 25 error LNK2019: 无法解析的外部符号 "public: __thiscall PbxCommandFactory::PbxCommandFactory(void)" (??0PbxCommandFactory@@QAE@XZ),该符号在函数 _main 中被引用 CtiServer.obj 前提是已经
#include "PbxCommandFactory.h"
#include "PbxCommandAbstractFactory.h"
请帮忙看下哪里有问题!感谢
我定义了一个工厂类
#pragma once
#include "stdafx.h"
#include "PbxCommandDecorator.h"
#include "PbxCommandForAvaya.h"
#include "PbxCommandAbstractFactory.h"
class PbxCommandFactory : public PbxCommandAbstractFactory
{
public:
PbxCommandFactory(void);
public:
~PbxCommandFactory(void);
public:
IPbxCommand* GetApiCommandForAvaya()
{
return new PbxCommandDecorator(new PbxCommandForAvaya());
}
};
然后我在项目的主函数里面调用下列语句
PbxCommandAbstractFactory *factory = new PbxCommandFactory();
factory->GetApiCommandForAvaya()->AcsOpenStream(ST_CSTA);报错内容如下:
错误 25 error LNK2019: 无法解析的外部符号 "public: __thiscall PbxCommandFactory::PbxCommandFactory(void)" (??0PbxCommandFactory@@QAE@XZ),该符号在函数 _main 中被引用 CtiServer.obj 前提是已经
#include "PbxCommandFactory.h"
#include "PbxCommandAbstractFactory.h"
请帮忙看下哪里有问题!感谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货