我试图使用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*)即使是我在主程序中添加了这个两个函数的实现。
发布于 2015-03-26 13:48:37
问题是在实施我忘记了的方法
struct soap* soap在方法定义中
https://stackoverflow.com/questions/29237012
复制相似问题