Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rép. : Re: Shared Objects and dyLibs



On Tue, 30 Jan 2001, Ernesto Corvi wrote:
> I'm quite confident '-fno-common' would deal with that case...

Sure, it deals. It just fails in a slightly different way:

# cc -Wall -dynamiclib -o /var/tmp/foo.dylib /var/tmp/foo.c /var/tmp/bar.c -fno-common
ld: multiple definitions of symbol _foo
/var/tmp/ccuraaaa.o definition of _foo in section (__DATA,__common)
/var/tmp/ccgxaaaa.o definition of _foo in section (__DATA,__common)
/usr/bin/libtool: internal link edit command failed
# cc -Wall -dynamiclib -o /var/tmp/foo.dylib /var/tmp/foo.c /var/tmp/bar.c
ld: common symbols not allowed with MH_DYLIB output format
/var/tmp/ccVraaaa.o definition of common _foo (size 4)
/usr/bin/libtool: internal link edit command failed

Either way, you need to change the code. I was just pointing out the idiom
that I've seen most often when running into this error.

matt.


References: 
 >Re: Rép. : Re: Shared Objects and dyLibs (From: Ernesto Corvi <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.