• 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: How to get details of link errors with Xcode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get details of link errors with Xcode?


  • Subject: Re: How to get details of link errors with Xcode?
  • From: Mark Dalrymple <email@hidden>
  • Date: Thu, 18 Aug 2005 10:56:52 -0400

> The correct way to link code is using the gcc compiler driver which
> automatically includes the necessary system libraries and invokes libtool,
> ld, and even lipo repeatedly if needed.


Not necessarily. For example, using the function asl_log in a program that is completely build by gcc will give you the blarg $LDBLStub errors:

#include <asl.h>

int main (void)
{
    asl_log (0, 0, 0, "test");

    return (0);

} // main

% gcc -g -Wall -o asl_log asl_log.c
/usr/bin/ld: Undefined symbols:
_asl_log$LDBLStub
collect2: ld returned 1 exit status


Using any non-vararg function will link propery. Any vararg function will get the $LDBLStub complaint. All of the LDBLStub complaints I've seen from folks have been vararg functions. I presume that the long double support in gcc 4 (hence the LDBL part) is the root cause of the issue.


This little program compiles fine in Xcode, and you can get it to compile ok from the command line by setting the MACOSX_DEPLOYMENT_TARGET env var before building with gcc.

Cheers,
++Mark Dalrymple, email@hidden
  http://borkware.com

_______________________________________________
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: How to get details of link errors with Xcode?
      • From: "Sean McBride" <email@hidden>
References: 
 >Re: How to get details of link errors with Xcode? (From: Bill Northcott <email@hidden>)

  • Prev by Date: Can't tell build configurations to use different libraries
  • Next by Date: Re: How to get details of link errors with Xcode?
  • Previous by thread: Re: How to get details of link errors with Xcode?
  • Next by thread: Re: How to get details of link errors with Xcode?
  • Index(es):
    • Date
    • Thread