• 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: strange link error: ld: Undefined symbols: _sprintf$LDBLStub
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange link error: ld: Undefined symbols: _sprintf$LDBLStub


  • Subject: Re: strange link error: ld: Undefined symbols: _sprintf$LDBLStub
  • From: Bill Northcott <email@hidden>
  • Date: Fri, 19 Aug 2005 08:39:26 +1000

On 19/08/2005, at 12:28 AM, Sean McBride wrote:
Basically you cannot link objects produced by gcc compilers with
different major versions.
Even when working with pure C?  (ie I know C++ name mangling changes
between compilers)

This is not a name mangling issue. It is caused by changes in the number and names of runtime libraries. The same thing happened with the gcc-2.x to gcc-3.x transition.

This is one reason why static libraries
are deprecated on MacOS X.
'deprecated' as in "discouraged and going away"?  Surely not?!  Where
does it say this?

Apple's developer documentation. Sorry I can't remember the reference.

Alas, these 3rd party libraries build as static libraries. But for the
moment, let's assume I could build them as dylibs.

If you build them yourself, you don't have a problem, because you can ensure you use the same compiler.


Can I put a .dylib
in my .app bundle?  Or does the .dylib have to be installed somewhere
like /usr/lib/?  I seem to remember that only .frameworks can go in
application bundles.

Have a look at packages like R. R.framework/R is actually a symlink to R.framework/Versions/2.x.x/Resources/lib/libR.dylib. The name extension of a dynamic library is irrelevant except at build time. Then it might matter because '-lfoo' will only find libfoo.a or libfoo.dylib and not foo. Whereas '-framework foo' will only find foo.framework/foo and ignore libfoo*.


The reason to embed frameworks is versioning. You can upgrade an framework while keeping the old dynamic library whose install name may be incorporated in some executable.

  I like static libs because they are built right
into my app, which allows me to have a drag-installable application.

No problem with that. Just build them yourself. A 'static library' is just a collection of .o files archived with ar and with an index added by ranlib to speed up linking.


Of course the reason to use dynamic libraries is to avoid duplication and to enable updating of the library without having to relink executables that use it. You takes your choice.

Bill
_______________________________________________
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


References: 
 >Re: strange link error: ld: Undefined symbols: _sprintf$LDBLStub (From: Bill Northcott <email@hidden>)
 >Re: strange link error: ld: Undefined symbols: _sprintf$LDBLStub (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: custom visualization in gdb...
  • Next by Date: Re: custom visualization in gdb...
  • Previous by thread: Re: strange link error: ld: Undefined symbols: _sprintf$LDBLStub
  • Next by thread: Target that contains only direct dependencies
  • Index(es):
    • Date
    • Thread