Re: Ld -U (Undefined Symbols) argument is ignored?
Re: Ld -U (Undefined Symbols) argument is ignored?
- Subject: Re: Ld -U (Undefined Symbols) argument is ignored?
- From: Jerry Krinock <email@hidden>
- Date: Sun, 20 Apr 2008 06:19:06 -0700
On 2008 Apr, 20, at 2:55, Jean-Daniel Dupas wrote:
The -U has not the same meaning when passed to gcc than when passed
to ld. It should probably be -Wl,-U instead
I understand that the -Wl, prefix is used when passing arguments to
gcc that you want forwarded to ld. Since I am entering these options
into the "Other Linker Flags" setting directly, I thought that Xcode
would pass them directly to ld and therefore the -Wl, would not be
needed. Indeed, if you look at my build transcript below, you see
that it is the call to Ld which is getting the -U option. So, it is
being passed to ld and not gcc.
I tried adding the -Wl, prefix to each -U anyhow, then got errors such
as: ".objc_class_name_Store: No such file or directory". It thinks
that my symbol name is supposed to be a path. So, -Wl, does not seem
to be the answer.
But you may also use "-undefined dynamic_lookup" that should be
accepted by gcc directly.
I tried that but had other issues, which I'd rather not pollute this
thread with. I prefer -U to "-undefined dynamic_lookup" because the
latter would turn off symbol checking for all symbols instead of just
the three that I know are OK. I would like ld to check as much as
possible.
Thank you, Jean-Daniel, but I am still confused.
Jerry
Le 20 avr. 08 à 03:47, Jerry Krinock a écrit :
I'm building a Bundle project with Xcode 3.0. If you look near the
end of the arguments to Ld in the Build Transcript below, you'll
see that I've used the -U option to name three symbols that are
undefined at this time and should be linked dynamically at
runtime. (They exist in the main executable, which does not yet
exist after a Clean, since this dependent Bundle is built first.)
But Ld ignores my intentions and declares errors on these three
undefined symbols anyhow. What's wrong?
Ld /private/tmp/BmTiger.build/Release/BmTiger.build/Objects-normal/
ppc/BmTiger normal ppc
cd /Users/jk/Documents/Programming/Projects/Bookdog/BmTiger
/Developer/usr/bin/gcc-4.0 -o /private/tmp/BmTiger.build/Release/
BmTiger.build/Objects-normal/ppc/BmTiger -L/Users/jk/Documents/
Programming/Builds/Release -F/Users/jk/Documents/Programming/Builds/
Release -F/Users/jk/Documents/Programming/Projects/Bookdog/
BmTiger/../../../Builds/Release -F/Users/jk/Documents/Programming/
Projects/Bookdog/BmTiger/../../../Builds/Debug -F/Users/jk/
Documents/Programming/Projects/Bookdog/BmTiger/../../../Builds/
Debug -F/Users/jk/Documents/Programming/Projects/Bookdog/
BmTiger/../../../Builds/Release -F/Users/jk/Documents/Programming/
Projects/Bookdog/BmTiger/../../../Builds/Debug -F/Users/jk/
Documents/Programming/Projects/Bookdog/BmTiger/../../../Builds/
Release -F/Users/jk/Documents/Programming/Projects/Bookdog/
BmTiger/../../../Builds/Release -filelist /private/tmp/
BmTiger.build/Release/BmTiger.build/Objects-normal/ppc/
BmTiger.LinkFileList -framework Cocoa -framework SSAlert -framework
SSApp -framework SSSQLiter -framework BmStuff -arch ppc -bundle -
mmacosx-version-min=10.4 -Wl,-dead_strip -
U .objc_class_name_NonhierarchicalStore -U .objc_class_name_Store -
U .objc_class_name_Browfile -isysroot /Developer/SDKs/MacOSX10.4u.sdk
Undefined symbols:
".objc_class_name_NonhierarchicalStore", referenced from:
.objc_class_name_DeliciousStore in DeliciousStore.o
".objc_class_name_Store", referenced from:
.objc_class_name_ShiiraStore in ShiiraStore.o
.objc_class_name_Firefox3Store in Firefox3Store.o
".objc_class_name_Browfile", referenced from:
literal-pointer@__OBJC@__cls_refs@Browfile in DeliciousTalker.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
_______________________________________________
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