• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Link error for "mach_absolute_time"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Link error for "mach_absolute_time"
      • From: Dirk Stegemann <email@hidden>
    • Re: Link error for "mach_absolute_time"
      • From: Dirk Stegemann <email@hidden>
References: 
 >Link error for "mach_absolute_time" (From: "Dirk Stegemann (Mailing-Lists)" <email@hidden>)
 >Re: Link error for "mach_absolute_time" (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: Link error for "mach_absolute_time"
  • Next by Date: Re: [OT] Radar and Data loss
  • Previous by thread: Re: Link error for "mach_absolute_time"
  • Next by thread: Re: Link error for "mach_absolute_time"
  • Index(es):
    • Date
    • Thread