Re: Link error for "mach_absolute_time"
Re: Link error for "mach_absolute_time"
- Subject: Re: Link error for "mach_absolute_time"
- From: Eric Albert <email@hidden>
- Date: Mon, 05 Nov 2007 09:57:29 -0800
On Nov 5, 2007, at 9:42 AM, Shawn Erickson wrote:
On 11/5/07, Dirk Stegemann (Mailing-Lists)
<email@hidden> wrote:
Hello,
I'm getting a link error when trying to build a program which uses
the mach_absolute_time() API, under following conditions:
As a test try adding -lSystem to OTHER_LDFLAGS in you xcconfig. Just a
shot in the dark...
It's very difficult to link without Libsystem. Missing
mach_absolute_time is usually a problem with C++ code including C
headers which don't have the appropriate 'extern "C"' sections. Try
wrapping your #include of whatever header you're using to pull in
mach_absolute_time with this:
#if __cplusplus
extern "C" {
#endif
#include <whatever that header is>
#if __cplusplus
}
#endif
Hope this helps,
Eric
_______________________________________________
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