On Aug 30, 2005, at 3:14 PM, Ando Sonenblick wrote: OK, changing the order of the libs does not prevent the error. I tried the linker flags as you suggested but either I entered them wrong or they game no extra details.
Is there no way just to say to Xcode, ignore multiple definitions and just use the first one?
Unfortunately I'm porting a massive code base and the guy before me didn't care about fixing multiple definitions (and CodeWarrior didn't force him to). Ideally, I want to fix these but I need to get builds being produced soon!
If you haven't yet gotten the message that The Man Pages Are Your Friend, I'm telling you now: the man pages are your friend.
-m (32-bit only) Don't treat multiply defined symbols from the linked objects as a hard error; instead, simply print a warning. The first linked object defining such a symbol is used for linking; its value is used for the symbol in the symbol table. The code and data for all such symbols are copied into the output. The duplicate sym- bols other than the first symbol may still end up being used in the resulting output file through local references. This can still produce a resulting output file that is in error. This flag's use is strongly discouraged!
Enter it on the Other Link Flags line (you may need to pass it as -Wl,-m [that's a lower-case ell]) to get it through to the linker.
But posting the build transcript of the link command line and its actual output as I requested earlier would be more helpful. As the man page says, use of -m can result n an output file that is in error (read: broken) and this flag's use is strongly discouraged.
Chris |