ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
Sam Lauber
sam124@operamail.com
Mon Jun 13 19:19:00 GMT 2005
> Sigh. #2 doesn't work as the compiler can synthesize common
> variables that you can't control, and when it does this, things
> won't work. Forcing people to use -single_module strikes me as
> wrong.
I don't know why it was set up like that. Come to think of it, this would
probably be a really good thread to forward to the Darwin mailing lists. They
would probably know ;-).
> So, from the standpoint of good advice, -fno-common is the only answer.
But if you already have good code (who would make a shared library out of
poorly written code?), then you should use -single_module because the only
visible influence on the resulting library is linker diagnostics, but a good
shared library wouldn't trigger any linker errors. (And plus, the linker does a
good job of finding errors before the library even gets stored to disk, unless
you use options like `-undefined dynamic_lookup').
Samuel Lauber
--
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com
Powered by Outblaze
More information about the Gcc
mailing list