我在Ubuntu 10.10上使用Netbeans IDE 6.9和G ++ Compilingtools。如果我尝试编译我的webservice,我会收到以下错误:
build/Debug/GNU-Linux-x86/main.o: In function `main':
/home/mark/NetBeansProjects/stonService/main.cpp:11: undefined reference to `stonSoapBindingService::stonSoapBindingService()'
/home/mark/NetBeansProjects/stonService/main.cpp:16: undefined reference to `stonSoapBindingService::serve()'
/home/mark/NetBeansProjects/stonService/main.cpp:18: undefined reference to `stonSoapBindingService::run(int)'
/home/mark/NetBeansProjects/stonService/main.cpp:19: undefined reference to `stonSoapBindingService::soap_stream_fault(std::basic_ostream<char, std::char_traits<char> >&)'
/home/mark/NetBeansProjects/stonService/main.cpp:24: undefined reference to `stonSoapBindingService::~stonSoapBindingService()'
/home/mark/NetBeansProjects/stonService/main.cpp:24: undefined reference to `stonSoapBindingService::~stonSoapBindingService()'
collect2: ld returned 1 exit status
make[2]: *** [dist/Debug/GNU-Linux-x86/stonservice] Fehler 1
make[1]: *** [.build-conf] Fehler 2
在我的main.cpp中,我包含.h文件,这些函数位于哪里。我的错误在哪里? makefile由netbeans生成!
答案 0 :(得分:2)
您必须将gSoap创建的文件添加到您的netbeans项目中(使用添加现有文件)。
然后,在项目礼仪中,您必须:
应该这样做。至少,它对我有用。
答案 1 :(得分:0)
我找到了我的问题的解决方案,这是因为我没有在main.cpp的wsdl文件中拥有所有函数!