Hello list. I'm a newbie with gSOAP and C/C++. I've created a Web
Service with JAX-WS 2.0, and now, it's being consummed by a .NET client.
Now, I need to create a C/C++ client, and I'm experimenting with gSOAP.
The problem that appears me is in compile time. I've these files:
main.c:
#include <iostream>
#include "gSOAP/soapStockQuoteSoapProxy.h"
#include "gSOAP/StockQuoteSoap.nsmap"
int main() {
StockQuoteSoap net;
_ns1__GetQuoteResponse rp;
_ns1__GetQuote rq;
std::string request("IBM");
rq.symbol = &request;
if (net.__ns1__GetQuote(&rq, &rp))
std::cout << & rp.GetQuoteResult;
return 0;
}
makefile:
main : main.o
g++ -o main main.o -L C:/MinGW/lib/gcc-lib/mingw32/3.2.3/ -lstdc++
main.o : main.cpp
g++ -ggdb -c main.cpp
all :
${MAKE} main
clean :
-del main.o
And g++ compilation result is:
mingw32-make
g++ -o main main.o -L C:/MinGW/lib/gcc-lib/mingw32/3.2.3/ -lstdc++
main.o: In function `~StockQuoteSoap':
gSOAP/soapStockQuoteSoapProxy.h:30: undefined reference to `soap_delete'
gSOAP/soapStockQuoteSoapProxy.h:30: undefined reference to `soap_end'
gSOAP/soapStockQuoteSoapProxy.h:30: undefined reference to `soap_free'
main.o: In function `~_ns1__GetQuoteResponse':
gSOAP/soapStub.h:80: undefined reference to `vtable for
_ns1__GetQuoteResponse'
main.o: In function `~_ns1__GetQuote':
gSOAP/soapStub.h:59: undefined reference to `vtable for _ns1__GetQuote'
main.o:gSOAP/soapStockQuoteSoapProxy.h:32: undefined reference to
`soap_call___ns1__GetQuote(soap*, char const*, char const*,
_ns1__GetQuote*, _ns1__GetQuoteResponse*)'
main.o: In function `ns1__GetQuote':
gSOAP/soapStub.h:58: undefined reference to `vtable for _ns1__GetQuote'
main.o: In function `ns1__GetQuoteResponse':
gSOAP/soapStub.h:79: undefined reference to `vtable for
_ns1__GetQuoteResponse'
main.o: In function `StockQuoteSoap':
gSOAP/soapStockQuoteSoapProxy.h:19: undefined reference to `soap_new'
main.o: In function `~StockQuoteSoap':
gSOAP/soapStockQuoteSoapProxy.h:30: undefined reference to `soap_delete'
gSOAP/soapStockQuoteSoapProxy.h:30: undefined reference to `soap_end'
gSOAP/soapStockQuoteSoapProxy.h:30: undefined reference to `soap_free'
collect2: ld returned 1 exit status
mingw32-make: *** [main] Error 1
You can see my project structure on this
<http://s16.photobucket.com/albums/b45/jeusdi/?action=view¤t=gSOAP\
1.png> .
Can you help me?
I will appreciate your help a lot.
Thanks for all.