LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gSOAP g++ building error (https://www.linuxquestions.org/questions/linux-newbie-8/gsoap-g-building-error-4175425553/)

HarryBoy 09-04-2012 05:28 AM

gSOAP g++ building error
 
I have gsoap installed, I am trying to to build one of the exmaples:

I do the following which builds a pure c version and this works fine:

Code:

g++  -c soapC.cpp
But when I try to build the c++ version like so:
Code:

g++ soapC.cpp
soapC.cpp:(.text+0x7645): undefined reference to `soap_element_begin_in'
soapC.cpp:(.text+0x7670): undefined reference to `soap_malloc'
soapC.cpp:(.text+0x76c0): undefined reference to `soap_revert'
soapC.cpp:(.text+0x76ce): undefined reference to `soap_malloc'
soapC.cpp:(.text+0x7752): undefined reference to `soap_id_lookup'
soapC.cpp:(.text+0x7773): undefined reference to `soap_element_end_in'
/tmp/ccMtcp0m.o: In function `soap_in_SOAP_ENV__Detail(soap*, char const*, SOAP_ENV__Detail*, char const*)':
soapC.cpp:(.text+0x77e5): undefined reference to `soap_element_begin_in'
soapC.cpp:(.text+0x783e): undefined reference to `soap_id_enter'
soapC.cpp:(.text+0x7926): undefined reference to `soap_inliteral'
soapC.cpp:(.text+0x799d): undefined reference to `soap_element_end_in'
soapC.cpp:(.text+0x79fd): undefined reference to `soap_id_forward'

How do I solve this???

HarryBoy 09-04-2012 05:56 AM

I have tried the following:
Quote:

g++ soapC.cpp -I /home/gsoap-2.8/gsoap/ -l libgsoap++.a
home/gsoap-2.8/gsoap includes header files and libgsoap++.s is a link as follows:
Quote:

libgsoap++.a -> /usr/local/lib/libgsoap++.a
But I now get the error:
Quote:

/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -llibgsoap++.a
collect2: ld returned 1 exit status
Any ideas??

pan64 09-04-2012 06:03 AM

try: -l gsoap++ (instead of -l libgsoap++.a)

HarryBoy 09-04-2012 06:09 AM

Thanks for your reply:

Quote:

g++ soapC.cpp -I /home/gsoap-2.8/gsoap/ -l gsoap++
/usr/local/lib/libgsoap++.a: file not recognized: File truncated
collect2: ld returned 1 exit status

Any further ides??

Thanks

knudfl 09-04-2012 08:21 AM

The file INSTALL.txt :

To configure and build the examples, use the --enable-samples option.
cd soap-2.8/ && ./configure --enable-samples


All times are GMT -5. The time now is 06:34 AM.