axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Gentsch ...@e-tge.de>
Subject Re: AW: AW: undefined reference errors in axis 1.6b
Date Fri, 17 Jun 2011 15:08:29 GMT

Hi Sander,

when I build a C or C++ prog, then linking usually looks like this:
 g++ ... -L../../../lib -laxis_client ...

i.e. I never have a relative path in the -l statements. Possibly the
linker now tries to find something
like ../../../lib/../../../lib/axis/libaxis_client.so i.e. it searches
the lib you specify with the -l in the directory specified with -L
(however, admittedly it does not complain about not finding the
libs ...)

Did you try to run the build commands directly (outside of make)? Then
you can play around with the paths ...
If that works, the question where the strange Makefile comes from.

And, finally, what happens if you say for example:
 $ nm libaxis_client.so

This should show you all the symbols within a lib, try that with all the
libs to find out the ones needed.

HTH
  tge

On Fri, 2011-06-17 at 16:22 +0200, Sander Hozee wrote:
> I've tried the calculator and the array samples, but I get the same output
> with compiling. I Assume it has something to do with the library's. I only
> don't know what exactly.
> 
> When I do for example "ls ../../../include/" or "ls
> ../../../lib/axis/libaxis_client*" from the directory with the makefile, I
> see the contents I want to see, so it isn't that I mistyped the path to
> the library's or the includes.
> 
> Underneath the output.
> 
> Sander
> 
> --------------------> Output for Calculator <--------------------
> 
> ~/axis/samples/client/calculator$ make clean ; make
> rm -f *.o client
> g++ -c -Wall -Wno-unused -Wno-write-strings -I ../../../include/ -L
> ../../../lib/  -l../../../lib/axis/axis_client
> -l../../../lib/axis/axis_server -l../../../lib/axis/axiscpp_mod
> -l../../../lib/axis/axiscpp_mod2 -l../../../lib/axis/axis_xerces
> -l../../../lib/axis/http_channel -l../../../lib/axis/http_channelssl
> Client.cpp -o Client.o
> Client.cpp: In function ‘bool IsNumber(const char*)’:
> Client.cpp:146: warning: comparison between signed and unsigned integer
> expressions
> g++ -c -Wall -Wno-unused -Wno-write-strings -I ../../../include/ -L
> ../../../lib/  -l../../../lib/axis/axis_client
> -l../../../lib/axis/axis_server -l../../../lib/axis/axiscpp_mod
> -l../../../lib/axis/axiscpp_mod2 -l../../../lib/axis/axis_xerces
> -l../../../lib/axis/http_channel -l../../../lib/axis/http_channelssl
> Calculator.cpp -o Calculator.o
> g++  Client.o Calculator.o -o client
> Calculator.o: In function `Calculator::div(int, int)':
> Calculator.cpp:(.text+0x28): undefined reference to
> `axiscpp::Call::initialize(axiscpp::PROVIDERTYPE)'
> Calculator.cpp:(.text+0x5a): undefined reference to
> `axiscpp::Call::getTransportProperty(char const*, bool)'
> Calculator.cpp:(.text+0x81): undefined reference to
> `axiscpp::Call::setTransportProperty(axiscpp::AXIS_TRANSPORT_INFORMATION_TYPE,
> char const*)'
> Calculator.cpp:(.text+0x97): undefined reference to
> `axiscpp::Call::setSOAPVersion(axiscpp::SOAP_VERSIONTag)'
> Calculator.cpp:(.text+0xb5): undefined reference to
> `axiscpp::Call::setOperation(char const*, char const*)'
> Calculator.cpp:(.text+0xc0): undefined reference to
> `axiscpp::Stub::applyUserPreferences()'
> Calculator.cpp:(.text+0xe5): undefined reference to
> `axiscpp::Call::addParameter(void*, char const*, axiscpp::XSDTYPETag)'
> Calculator.cpp:(.text+0x10a): undefined reference to
> `axiscpp::Call::addParameter(void*, char const*, axiscpp::XSDTYPETag)'
> Calculator.cpp:(.text+0x118): undefined reference to
> `axiscpp::Call::invoke()'
> Calculator.cpp:(.text+0x13f): undefined reference to
> `axiscpp::Call::checkMessage(char const*, char const*)'
> Calculator.cpp:(.text+0x166): undefined reference to
> `axiscpp::Call::getElementAsInt(char const*, char const*)'
> Calculator.cpp:(.text+0x18a): undefined reference to
> `axiscpp::Axis::AxisDelete(void*, axiscpp::XSDTYPETag)'
> Calculator.cpp:(.text+0x198): undefined reference to
> `axiscpp::Call::unInitialize()'
> Calculator.cpp:(.text+0x204): undefined reference to
> `axiscpp::SoapFaultException::SoapFaultException(axiscpp::AxisException&)'
> Calculator.cpp:(.text+0x20c): undefined reference to
> `axiscpp::SoapFaultException::~SoapFaultException()'
> Calculator.cpp:(.text+0x214): undefined reference to `typeinfo for
> axiscpp::SoapFaultException'
> Calculator.cpp:(.text+0x25f): undefined reference to
> `axiscpp::Call::checkFault(char const*, char const*)'
> Calculator.cpp:(.text+0x276): undefined reference to
> `axiscpp::Call::unInitialize()'
> Calculator.cpp:(.text+0x297): undefined reference to
> `axiscpp::SoapFaultException::SoapFaultException(axiscpp::AxisException&)'
> Calculator.cpp:(.text+0x29f): undefined reference to
> `axiscpp::SoapFaultException::~SoapFaultException()'
> Calculator.cpp:(.text+0x2a7): undefined reference to `typeinfo for
> axiscpp::SoapFaultException'
> Calculator.o: In function `Calculator::mul(int, int)':
> Calculator.cpp:(.text+0x32e): undefined reference to
> `axiscpp::Call::initialize(axiscpp::PROVIDERTYPE)'
> ...
> 
> 
> --------------------> makefile for Calculator<--------------------
> 
> CC=g++
> EXTRACFLAG=-l../../../lib/axis/axis_client -l../../../lib/axis/axis_server
> -l../../../lib/axis/axiscpp_mod -l../../../lib/axis/axiscpp_mod2
> -l../../../lib/axis/axis_xerces -l../../../lib/axis/http_channel
> -l../../../lib/axis/http_channelssl
> CFLAGS=-c -Wall -Wno-unused -Wno-write-strings -I ../../../include/ -L
> ../../../lib/  $(EXTRACFLAG)
> LDFLAGS=
> SOURCES1=Client.cpp Calculator.cpp
> ... (the rest is the same as for the previous version)
> 
> 
> --------------------> Output for array <--------------------
> 
> ~/axis/samples/client/array$ make clean ; make
> rm -f *.o client
> g++ -c -Wall -Wno-unused -Wno-write-strings -I ../../../include/ -L
> ../../../lib/  -l../../../lib/axis/axis_client
> -l../../../lib/axis/axis_server -l../../../lib/axis/axiscpp_mod
> -l../../../lib/axis/axiscpp_mod2 -l../../../lib/axis/axis_xerces
> -l../../../lib/axis/http_channel -l../../../lib/axis/http_channelssl
> Client.cpp -o Client.o
> ../../../include/axis/AxisUserAPI.hpp: In function ‘int main(int, char**)’:
> ../../../include/axis/AxisUserAPI.hpp:483: error: ‘void**
> axiscpp::Axis_Array::m_Array’ is protected
> Client.cpp:58: error: within this context
> Client.cpp:58: error: invalid conversion from ‘int**’ to ‘void**’
> ../../../include/axis/AxisUserAPI.hpp:488: error: ‘int
> axiscpp::Axis_Array::m_Size’ is protected
> Client.cpp:59: error: within this context
> ../../../include/axis/AxisUserAPI.hpp:483: error: ‘void**
> axiscpp::Axis_Array::m_Array’ is protected
> Client.cpp:64: error: within this context
> Client.cpp:68: error: cannot convert ‘axiscpp::xsd__int_Array’ to
> ‘axiscpp::xsd__int_Array*’ in assignment
> Client.cpp:76: error: request for member ‘m_Array’ in
> ‘output->Type::item’, which is of non-class type
> ‘axiscpp::xsd__int_Array*’
> make: *** [Client.o] Error 1
> ~/axis/samples/client/array$
> 
> 
> 
> 
> > OK, as an easy step, can you take the example applications from axis2/C
> > and build them all? then debug, test, run them all on your development
> > platform, the Server and the Client on the same platform, your development
> > System.
> >
> > Because - If that fails already - you will have to master this step/part
> > first.
> >
> > If that works, you may think about deploying you server and service to the
> > embedded system (if possible).
> >
> > But as I understand you: you have already problems compiling / linking
> > sources of your client, whereas some sources are generated code.
> >
> > That leverages again my question: can you build all the axis2/C example
> > applications with your developers environment and debug and run them?
> > There you don't have to generate code from WSDL. Just make em and run em
> > and tell me about your experiments results.
> >
> > Josef
> >
> >
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Sander Hozee [mailto:sander@luminext.eu]
> > Gesendet: Mittwoch, 15. Juni 2011 16:14
> > An: Apache AXIS C User List
> > Betreff: Re: AW: undefined reference errors in axis 1.6b
> >
> > Josef,
> >
> > Thank you for your answer.
> >
> > I don't know if I understand what you mean. I can't compile, so I can't
> > make a client. I assume first making a server doesn't change that, or do I
> > understand you wrong?
> >
> > Sander
> >
> >
> >> Ok, you have a development system and you have a embedded system can you
> > make an axis2/cpp client and and axis2/cpp
> >> web-service-server+service (maybe the service just a stub without the
> > code
> >> your embedded devise is to execute later, just passing parameters as you
> > need to pass and see what is returned) for your development system? The
> > system should do exactly the same as you try to do it toward your
> > embedded
> >> device. I would do that first. Because if that build fails, then your
> > much
> >> closer to continue debugging from where you are. If that fails, don't
> > wonder why embedded development demanding additional steps and
> > complexity
> >> and compiler switches will fail aswell.
> >> Josef
> >> -----Ursprüngliche Nachricht-----
> >> Von: Sander Hozee [mailto:sander@luminext.eu]
> >> Gesendet: Dienstag, 14. Juni 2011 16:46
> >> An: c-user@axis.apache.org
> >> Betreff: undefined reference errors in axis 1.6b
> >> Hi,
> >> I'm trying to communicate with an embedded device using SOAP. I have
> > made
> >> the stub files with axis WSDL2Ws and tried to compile them. But when I
> > do
> >> this, I get a lot of 'undefined reference' errors.
> >> I have tried including all the library files, and including only
> > libaxis_client, but none of this works.
> >> I'm running axis 1.6b under Linux Debian Lenny and I'm programming in
> > C++.
> >> I have pasted underneath: the output of make, the makefile and the
> >> program.
> >> Can anybody tell me how I could resolve this problem?
> >> Thanks,
> >> Sander
> >> --------------------> Make output <--------------------
> >> ~/ilon-cpp$ make clean ; make
> >> rm -f *.o stub/*.o send
> >> g++ -c -Wall -Wno-unused -Wno-write-strings -I axisinclude/ -L axislib/
> > -I
> >> axisinclude/axis/ -L axislib/axis -laxislib/axis/axis_client
> >> -laxislib/axis/axis_server -laxislib/axis/axiscpp_mod
> >> -laxislib/axis/axiscpp_mod2 -laxislib/axis/axis_xerces
> >> -laxislib/axis/http_channel -laxislib/axis/http_channelssl send.cpp -o
> > send.o
> >> g++ -c -Wall -Wno-unused -Wno-write-strings -I axisinclude/ -L axislib/
> > -I
> >> axisinclude/axis/ -L axislib/axis -laxislib/axis/axis_client
> >> -laxislib/axis/axis_server -laxislib/axis/axiscpp_mod
> >> -laxislib/axis/axiscpp_mod2 -laxislib/axis/axis_xerces
> >> -laxislib/axis/http_channel -laxislib/axis/http_channelssl
> >> stub/iLON100portType.cpp -o stub/iLON100portType.o
> >> g++  send.o stub/iLON100portType.o -o send
> >> stub/iLON100portType.o: In function
> >> `iLON100portType::InvokeCmd(Item_Coll*)':
> >> iLON100portType.cpp:(.text+0x28): undefined reference to
> >> `axiscpp::Call::initialize(axiscpp::PROVIDERTYPE)'
> >> iLON100portType.cpp:(.text+0x5a): undefined reference to
> >> `axiscpp::Call::getTransportProperty(char const*, bool)'
> >> iLON100portType.cpp:(.text+0x81): undefined reference to
> >> `axiscpp::Call::setTransportProperty(axiscpp::AXIS_TRANSPORT_INFORMATION_TYPE,
> > char const*)'
> >> iLON100portType.cpp:(.text+0x97): undefined reference to
> >> `axiscpp::Call::setSOAPVersion(axiscpp::SOAP_VERSIONTag)'
> >> iLON100portType.cpp:(.text+0xb5): undefined reference to
> >> `axiscpp::Call::setOperation(char const*, char const*)'
> >> iLON100portType.cpp:(.text+0xc0): undefined reference to
> >> `axiscpp::Stub::includeSecure()'
> >> iLON100portType.cpp:(.text+0xcb): undefined reference to
> >> `axiscpp::Stub::applyUserPreferences()'
> >> iLON100portType.cpp:(.text+0xe1): undefined reference to
> >> `axiscpp::Call::getNamespacePrefix(char const*)'
> >> iLON100portType.cpp:(.text+0x117): undefined reference to
> >> `Axis_Delete_Item_Coll(Item_Coll*, bool, int)'
> >> iLON100portType.cpp:(.text+0x11f): undefined reference to
> >> `Axis_Serialize_Item_Coll(Item_Coll*, axiscpp::IWrapperSoapSerializer*,
> > bool)'
> >> iLON100portType.cpp:(.text+0x12e): undefined reference to
> >> `axiscpp::Call::addCmplxParameter(void*, void*, void*, char const*, char
> > const*)'
> >> iLON100portType.cpp:(.text+0x13c): undefined reference to
> >> `axiscpp::Call::invoke()'
> >> iLON100portType.cpp:(.text+0x163): undefined reference to
> >> `axiscpp::Call::checkMessage(char const*, char const*)'
> >> iLON100portType.cpp:(.text+0x18a): undefined reference to
> >> `Axis_Delete_Item_Coll(Item_Coll*, bool, int)'
> >> iLON100portType.cpp:(.text+0x192): undefined reference to
> >> `Axis_Create_Item_Coll(Item_Coll*, bool, int)'
> >> iLON100portType.cpp:(.text+0x19a): undefined reference to
> >> `Axis_DeSerialize_Item_Coll(Item_Coll*,
> >> axiscpp::IWrapperSoapDeSerializer*)'
> >> iLON100portType.cpp:(.text+0x1a2): undefined reference to
> >> `axiscpp::Call::getCmplxObject(void*, void*, void*, char const*, char
> > const*)'
> >> iLON100portType.cpp:(.text+0x1b3): undefined reference to
> >> `axiscpp::Call::unInitialize()'
> >> iLON100portType.cpp:(.text+0x20c): undefined reference to
> >> `axiscpp::Call::unInitialize()'
> >> iLON100portType.cpp:(.text+0x22f): undefined reference to
> >> `axiscpp::Call::checkFault(char const*, char const*)'
> >> iLON100portType.cpp:(.text+0x273): undefined reference to
> >> `axiscpp::Call::getFaultAsXMLString()'
> >> iLON100portType.cpp:(.text+0x2f2): undefined reference to
> >> `axiscpp::OtherFaultException::OtherFaultException(char const*, char
> > const*, char const*, char const*, int)'
> >> iLON100portType.cpp:(.text+0x311): undefined reference to
> >> `axiscpp::Axis::AxisDelete(void*, axiscpp::XSDTYPETag)'
> >> iLON100portType.cpp:(.text+0x31f): undefined reference to
> >> `axiscpp::Call::unInitialize()'
> >> iLON100portType.cpp:(.text+0x358): undefined reference to
> >> `axiscpp::OtherFaultException::OtherFaultException(axiscpp::OtherFaultException
> > const&)'
> >> iLON100portType.cpp:(.text+0x360): undefined reference to
> >> `axiscpp::OtherFaultException::~OtherFaultException()'
> >> iLON100portType.cpp:(.text+0x368): undefined reference to `typeinfo for
> > axiscpp::OtherFaultException'
> >> iLON100portType.cpp:(.text+0x39b): undefined reference to
> >> `axiscpp::OtherFaultException::~OtherFaultException()'
> >> iLON100portType.cpp:(.text+0x3b1): undefined reference to
> >> `axiscpp::Call::unInitialize()'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::Clear(Item_Coll*)':
> >> ... (a lot of repeats here)
> >> iLON100portType.cpp:(.text+0x1f52): undefined reference to
> >> `axiscpp::OtherFaultException::~OtherFaultException()'
> >> iLON100portType.cpp:(.text+0x1f5a): undefined reference to `typeinfo for
> > axiscpp::OtherFaultException'
> >> iLON100portType.cpp:(.text+0x1f8d): undefined reference to
> >> `axiscpp::OtherFaultException::~OtherFaultException()'
> >> iLON100portType.cpp:(.text+0x1fa3): undefined reference to
> >> `axiscpp::Call::unInitialize()'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::~iLON100portType()':
> >> iLON100portType.cpp:(.text+0x2006): undefined reference to
> >> `axiscpp::Stub::~Stub()'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::~iLON100portType()':
> >> iLON100portType.cpp:(.text+0x2036): undefined reference to
> >> `axiscpp::Stub::~Stub()'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::~iLON100portType()':
> >> iLON100portType.cpp:(.text+0x2066): undefined reference to
> >> `axiscpp::Stub::~Stub()'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::iLON100portType(char
> >> const*, axiscpp::AXIS_PROTOCOL_TYPE)':
> >> iLON100portType.cpp:(.text+0x209b): undefined reference to
> >> `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::iLON100portType(char
> >> const*, axiscpp::AXIS_PROTOCOL_TYPE)':
> >> iLON100portType.cpp:(.text+0x20c5): undefined reference to
> >> `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::iLON100portType()':
> >> iLON100portType.cpp:(.text+0x20f3): undefined reference to
> >> `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
> >> iLON100portType.cpp:(.text+0x2112): undefined reference to
> >> `axiscpp::Call::setEndpointURI(char const*)'
> >> iLON100portType.cpp:(.text+0x2127): undefined reference to
> >> `axiscpp::Stub::~Stub()'
> >> stub/iLON100portType.o: In function
> > `iLON100portType::iLON100portType()':
> >> iLON100portType.cpp:(.text+0x2161): undefined reference to
> >> `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
> >> iLON100portType.cpp:(.text+0x2180): undefined reference to
> >> `axiscpp::Call::setEndpointURI(char const*)'
> >> iLON100portType.cpp:(.text+0x2195): undefined reference to
> >> `axiscpp::Stub::~Stub()'
> >> stub/iLON100portType.o:(.rodata._ZTI15iLON100portType[typeinfo for
> > iLON100portType]+0x8): undefined reference to `typeinfo for
> > axiscpp::Stub'
> >> collect2: ld returned 1 exit status
> >> make: *** [send] Error 1
> >> --------------------> send.cpp <--------------------
> >> #include "stub/iLON100portType.hpp"
> >> #include <axis/client/Stub.hpp>
> >> using namespace std;
> >> int main(int argc, char** argv)
> >> {
> >>   iLON100portType *doRead = new iLON100portType;
> >>   delete doRead;
> >>   return 0;
> >> }
> >> --------------------> makefile <--------------------
> >> CC=g++
> >> EXTRACFLAG=-laxislib/axis/axis_client -laxislib/axis/axis_server
> > -laxislib/axis/axiscpp_mod -laxislib/axis/axiscpp_mod2
> >> -laxislib/axis/axis_xerces -laxislib/axis/http_channel
> >> -laxislib/axis/http_channelssl
> >> CFLAGS=-c -Wall -Wno-unused -Wno-write-strings -I axisinclude/ -L
> > axislib/
> >> -I axisinclude/axis/ -L axislib/axis $(EXTRACFLAG)
> >> LDFLAGS=
> >> SOURCES1=send.cpp stub/iLON100portType.cpp
> >> OBJECTS1=$(SOURCES1:.cpp=.o)
> >> EXECUTABLE1=send
> >> all: $(EXECUTABLE1)
> >> $(EXECUTABLE1): $(OBJECTS1)
> >>         $(CC) $(LDFLAGS) $(OBJECTS1) -o $@
> >> .cpp.o:
> >>         $(CC) $(CFLAGS) $< -o $@
> >> clean:
> >>         rm -f *.o stub/*.o $(EXECUTABLE1)
> >> ----------------------------------------
> >> --------------------------------------------------------------------- To
> > unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: c-user-help@axis.apache.org
> >> --------------------------------------------------------------------- To
> > unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: c-user-help@axis.apache.org
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> > For additional commands, e-mail: c-user-help@axis.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> > For additional commands, e-mail: c-user-help@axis.apache.org
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-user-help@axis.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


Mime
View raw message