[xsd-users] multiple definitions errors

Henderson, H.C. (Henk) henk.henderson at tno.nl
Mon Sep 11 04:59:17 EDT 2017


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.




More information about the xsd-users mailing list