On Aug 30, 2005, at 3:14 PM, Ando Sonenblick wrote: Chris,
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!
Four people suggested that you read the man page to nm to answer your first question. You could also read the man page for ld to answer this one:
-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!
Again, if you post the build transcript containing the link invocation and the error, maybe we could help you more.
Chris |