[xsd-users] multiple definitions errors
Henderson, H.C. (Henk)
henk.henderson at tno.nl
Thu Sep 14 10:57:47 EDT 2017
Hello,
I have now problems with using xsd in combination with xerces under linux
I have now a build shared library libLLBMLPlugin.so but when I use it in my application I get always the run error:
Error loading /home/hendersonhc/Tools/eclipse_ws_cpp/LLBMLPlugin/Release/libLLBMLPlugin.so /home/hendersonhc/Tools/eclipse_ws_cpp/LLBMLPlugin/Release/libLLBMlPlugin.so: undefined symbol: _ZKN11xerces_3_213XMLAttDefList14isSerializableEv)
I have tried a lot but this message keeps coming when I run my application.
I have followed the build instructions:
http://www.codesynthesis.com/projects/xsd/extras/build-unix.xhtml
I have tried to build xerces-3.2.0 as a dynamic library (see under Xerces-C++ header)
The command
>./configure --disable-threads --disable-network --disable-static CXXFLAGS=-O2 CFLAGS=-O2
gives the output in the attachment (out.log)
Runing the make command in the src directory gives
>make
make all-am
make[1]: Entering directory `/home/hendersonhc/Tools/xerces-c-3.2.0/src'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/home/hendersonhc/Tools/xerces-c-3.2.0/src'
>
Maybe something is happened but I cannot find a shared library (.so file) after running the make.
I also have done the instructions under All-In-One-Packages resulting in the directory xsd-4.0.0+dep
In my eclipse project I have paths to the include file xerces-c-3.2.0/src and xsd-4.0.0+dep/xsd/libxsd
Before this I have also tried a lot with the xerces 3.1.1 version but that gives the same running problem.
I don't know how to solve the problem. How should I configure everything to make it work ?
What is the meaning of the undefined symbol error. Is that a missing shared library or something else ?(
(I have also installed the libxerces-c-3.1.so library but that won't help).
Note that I didn't have this problems when I build and run with the windows version of my program but there xsd and xerxes where together in one installation.
Thanks,
Henk
-----Original Message-----
From: Henderson, H.C. (Henk)
Sent: maandag 11 september 2017 10:59
To: xsd-users at codesynthesis.com
Cc: Berg, T.W. (Tom) van den <tom.vandenberg at tno.nl>
Subject: RE: [xsd-users] multiple definitions errors
Hello Boris,
I have checked my eclipse project and indeed there are two directories with the same code in the project (the double code was hidden in some of the subdirectories and taken into the project after a refresh).
During the compile this is not a problem since the include says from which directory the code should be taken but during the link there are to .o files (since the directory that is double is also compiled). The double .o files gives the multiple defined link error.
After removing the double directory from the project I was able to link my shared library without any problems
Thanks,
Henk
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: vrijdag 8 september 2017 19:18
To: Henderson, H.C. (Henk) <henk.henderson at tno.nl>
Cc: xsd-users at codesynthesis.com; richard.warren at antycipsimulation.com; Berg, T.W. (Tom) van den <tom.vandenberg at tno.nl>
Subject: Re: [xsd-users] multiple definitions errors
Henderson, H.C. (Henk) <henk.henderson at tno.nl> writes:
> (I use eclipse for cpp) I get a lot of multiple defined link errors
>
> [...]
>
> Note that I have also build and run my application with the generated
> code under Windows using Visual Studio 12 for c++ without any problems.
Then it must be some project setup issue on Linux since the generated code is identical on all platforms. Check that you are not linking the object file produced from the generated code twice or some such.
Boris
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.log
Type: application/octet-stream
Size: 13788 bytes
Desc: out.log
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20170914/624a2293/out.obj
More information about the xsd-users
mailing list