我正在尝试使用gSOAP创建一个c++/QT服务器/客户端
这是我的Test.h文件
//gsoap ns service name: ColisageMutexService
//gsoap ns service style: rpc
//gsoap ns service encoding: literal
//gsoap ns service location: http://localhost:1444
//gsoap ns schema namespace: urn:ColisageMutex
class FamilleProduit
{
private:
int Id;
std::string Libelle;
public:
FamilleProduit();
~FamilleProduit();
int getId();
void setId(int value);
std::string getLibelle();
void setLibelle(std::string value);
};
//gsoap ns service method-action: ajouterByType ""
int ns__ajouterByType ( FamilleProduit familleproduit, bool * result);
//gsoap ns service method-action: ajouterByLibelle ""
int ns__ajouterByLibelle ( std::string libelle, bool * result);
我跑了
oapcpp2.exe -I -pTest Test.h
我将生成的代码与我的项目集成,但问题是编译器总是给我带来错误
error: undefined reference to `ns__ajouterByType(soap*, FamilleProduit, bool*)
和
error: undefined reference to `ns__ajouterByLibelle(soap*, std::string, bool*)
即使我在主要部分中添加了这两个函数的实现