Re: Xcode Tiger to Leopard duplicate symbols mystery
Re: Xcode Tiger to Leopard duplicate symbols mystery
- Subject: Re: Xcode Tiger to Leopard duplicate symbols mystery
- From: Tomas Zahradnicky <email@hidden>
- Date: Mon, 28 Sep 2009 20:25:24 +0200
Hi Ryan,
this error means, that there is a public text (T) symbol which is
defined in more than one place. Look at the declaration of the
g_bit_nth_lsf function. The most common problem is that the function
is defined in a header file and therefore it gets included to every
file you include this header to and linker does not know which module
to pick this public function from and thus complaints.
To solve the problem, you either move the function into a separate c
file and change its declaration to extern or you can use the static
keyword, which makes the function available in each module separately
while being not visible to the outside world. Linker will not complain
in the latter case and you will see multiple functions with the same
name as a private text (t) symbol.
Cheers,
Tomas
Le 28 oct. 07 à 23:15, Ryan Homer a écrit :
Just to be clear, the project compiles with no problems, it's the
linking stage that I get this. However, I'm thinking that it's
during the compile stage that something has to change so those
symbols don't end up in the object files.
I just re-built my libmimic framework under Leopard, which went
well, and used the freshly built framework to try to re-build the
main project, but I still get the same error.
Help! :-)
R
On 28-Oct-07, at 10/28/07 5:06 PM, Ryan Homer wrote:
Hi all,
I just upgraded to Leopard and am trying to build a Tiger project
in Leopard. During the Leopard Betas I've tried building my project
and have successfully done so several times. Two major changes
since the last trial are 1) the addition of a new library 2) i386
only to Universal build. The error is:
ld: duplicate symbol _g_bit_nth_lsf in /Users/.../Objects-normal/
i386/CamDirectConnection.o and /Users/.../Objects-normal/i386/
AVController.o
This comes from the glib library which I have inside a framework
bundle. The framework is libmimic, which I've built myself into a
Universal binary. Each of the .o files referenced above does call
some of the libmimic functions, which in turn calls the glib
functions. Using 'nm' on each file, I do see _g_bit_nth_lsf in both
of them
.
.
.
00000000 T _g_bit_nth_lsf
00000049 T _g_bit_nth_msf
00000098 T _g_bit_storage
0000012d T _g_trash_stack_height
00000114 T _g_trash_stack_peek
000000e2 T _g_trash_stack_pop
000000bc T _g_trash_stack_push
.
.
.
If I do the same to the .o files from the Tiger build, I do not see
these lines anywhere, not even in one of the two files. Does
anybody have any idea of what going on here?
Thanks in advance.
_______________________________________________
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
# Ing. Tomas Zahradnicky, Jr.
# Assistant Professor
# Department of Computer Systems
# Faculty of Information Technologies
# The Czech Technical University in Prague
_______________________________________________
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