Gsoap ++ communication error

I wrote a soap client with the gsoap ++ library. as soon as I compiled this as a standalone test application, it compiled fine, but when I try to compile these classes, including in my project, I get a lot of binding errors:

../common/UserGausClient/UserGausClient.o: In function `GAUS::SSLInit()':
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/UserGausClient.h:11: undefined reference to `soap_ssl_init'
../common/UserGausClient/soapC.o: In function `soap_faultdetail':
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:117: undefined reference to `soap_malloc'
../common/UserGausClient/soapC.o: In function `soap_getelement':
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:152: undefined reference to `soap_peek_element'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:154: undefined reference to `soap_lookup_type'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:155: undefined reference to `soap_lookup_type'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:215: undefined reference to `soap_match_tag'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:219: undefined reference to `soap_match_tag'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:223: undefined reference to `soap_match_tag'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:227: undefined reference to `soap_match_tag'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:231: undefined reference to `soap_match_tag'
../common/UserGausClient/soapC.o:/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:235: more undefined references to `soap_match_tag' follow
../common/UserGausClient/soapC.o: In function `soap_ignore_element(soap*)':
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:333: undefined reference to `soap_peek_element'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:337: undefined reference to `soap_match_tag'
/home/milo/src/pinmoney/src/registrator/../common/UserGausClient/soapC.cpp:354: undefined reference to `soap_element_end_in'
../common/UserGausClient/soapC.o: In function `soap_class_id_enter(soap*, char const*, void*, int, unsigned int, char const*, char const*)':

etc. In Codeblocks, this is due to a fine ... Here is my Makefile:

CC=g++
RM=rm
CFLAGS=-c -g -Wall -DWITH_OPENSSL
LDFLAGS=-lpcrecpp -lpq -lcryptopp -lprotobuf -lrt -lgsoapssl++ -lssl -lcrypto -L/usr/lib/ -L/usr/local/lib/ -lgsoap

SOURCES=../common/PgConnectionManager.cpp \
    ../common/RSADecryptor.cpp \
    ../common/RSAEncryptor.cpp \
    ../common/RSAKeyGenerator.cpp \
    ../common/RSAKeyLoaderBase.cpp \
    ../common/RSAManager.cpp \
    ../common/TcpServer.cpp \
    ../common/UserGausClient/UserGausClient.cpp \
    ../common/UserGausClient/soapC.cpp \
    ../common/UserGausClient/soapuserBindingProxy.cpp \
    ../proto/BalanceHistory.pb.cc \
    ../proto/Bio.pb.cc \
    ../proto/ClientRegistration.pb.cc \
    ../proto/EmployeePermissions.pb.cc \
    ../proto/OperatorAuthentication.pb.cc \
    ../proto/Passport.pb.cc \
    ../proto/Ping.pb.cc \
    ../proto/SearchForBill.pb.cc \
    ../proto/UpdateClientData.pb.cc \
    RequestDispatcher.cpp \
    SQLStorage.cpp \
    SessionManager.cpp \
    main.cpp \


OBJECTS_SEARCHER=$(SOURCES:.cpp=.o)
OBJECTS=$(OBJECTS_SEARCHER:.cc=.o)

SEARCHER=registrator
INCLUDE=-I ../ 

all: $(SEARCHER) 

$(SEARCHER): $(OBJECTS)
    $(CC) $(LDFLAGS) $(OBJECTS) -o $@
clean:
    $(RM) -f $(OBJECTS)

.cpp.o:
    $(CC) $(CFLAGS) $(INCLUDE) $< -o $@

I contacted all the required libraries ( -lgsoapssl++ -lssl -lcrypto), and I checked the following functions in them:

$ nm /usr/lib/libgsoapssl++.a | grep soap_begin_count
00018da0 T soap_begin_count

and is in the libraries. so what's the problem?

+3
source share
3 answers

I believe that you should compile one of the gSoap stdsoap2 files. * in his make. The generated soapC file depends on the main gSoap code.

+1
source

'stdsoap2.cpp' gsoap.

PATH_TO_GSOAP_BUILD/gsoap-2.8/gsoap/stdsoap2.cpp( gsoap-2.8)

+1

One possible reason for this is the order in which the libraries are indicated to the linker, some literators require that the libarary containing the function definition appear after the object or library that requires it. Try reinstalling the library definitions for this to happen here and check the documentation of your linkers to see if it is required.

0
source

All Articles