Ld: -multible_defined defaults to "suppress"??
Ld: -multible_defined defaults to "suppress"??
- Subject: Ld: -multible_defined defaults to "suppress"??
- From: Andreas Grosam <email@hidden>
- Date: Wed, 13 Sep 2006 00:02:10 +0200
When calling the static link editor ld, the option -multiple_defined
specifies how multible defined symbols in dynamic libraries will be
treated. The parameter can be error, warning or suppress.
When XCode calls Ld for linking an output file, Ld suppresses multible
defined symbols by default. It seems there is no parameter set
explicitly for option -multible_defined from XCode, so there is the
default taken.
The man page to ld tells us, that the default for this option for ld
when linking two_level namespace is indeed "suppress".
I'm a bit confused, since I would strongly recommend to use "warning"
for the default paramter, or better in the XCode build settings.
Multible defined symbols may become subtle errors and are almost always
never intended. It may happen when people create or refactor at the
shared library level, inadvertantly incorporate one definition in
several shared libs, or just change visibility flags. Actually,
multible defined symbols violate the one definition rule (ODR).
We can set this ld option in the target settings with the "Other Linker
Flags" build option and add "-multible_defined warning".
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden