Re: Linker Errors
Re: Linker Errors
- Subject: Re: Linker Errors
- From: Chris Espinosa <email@hidden>
- Date: Mon, 28 Sep 2009 20:16:34 -0700
On Sep 28, 2009, at 8:02 PM, K. Chen wrote: I use the Xcode Objective-C source code to make a reference call to a C-callable function.
1. Knowing that it's C, I use extern "C" declaration to direct the compiler NOT to generate the mangled function reference. Fair enough, Xcode didn't mangle the function reference. 2. I compile my C function with Xcode, and it also generate straight (i.e. unmangled) function symbol. 3. Now when I build them together, Xcode runs into linking error, where the referenced C functions in Objective-C source CANNOT be found.
I did some digging using 'nm' and found the following: 1. The Objective-C object shows the function foo as.
U _foo
2. The C object shows the functions as.
00002b27 T _foo
Any ideas??
U and T go together; U is the usage and T is the export. .eh is the exception handler entry point. Everything looks fine there.
Could you drag and drop the Linking item from your build log, and its output, so we can see what the linker is actually being told to do?
Chris
|
_______________________________________________
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