• 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
Linking to a dylib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linking to a dylib


  • Subject: Linking to a dylib
  • From: Randy Croucher <email@hidden>
  • Date: Thu, 6 Nov 2003 00:16:13 -0800

Hello, I am trying to come over to Xcode, but I am having a few difficulties.

I made a project with two dylib targets in it (A & B). I built dylib A with a function in it (F). In the second dylib (B), it has functions in it that call function F in dylib A.

As one would expect, when dylib B tries to link, it says there is an "Undefined symbol: F". So I assumed that dylib B would need to link to dylib A. So I set my active target to dylib B, selected the dylib A target from the tree, and added to dylib B by checking the little check box in the last column or by dragging it down to the dylib B target (this seems to add -lB to the linker flags).

I then get a "Build failed (see build log for details)" message. I can only assume that means to look below at the output pane, and it says "/usr/bin/libtool: can't locate file for: -lB" and "/usr/bin/libtool: file: -lB is not an object file (not allowed in a library)".

Is there something I am doing wrong? How are you supposed to link to a dylib? I tried manually adding the -l B.dylib to the "Other Linker Flags" myself, and got the same results.

Thanks in advance,
Randy Croucher
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Linking to a dylib
      • From: Randy Croucher <email@hidden>
  • Prev by Date: Re: Compiler error on NSAddImage call
  • Next by Date: project builder or xcode for Panther
  • Previous by thread: I use Project Builder on Panther
  • Next by thread: Re: Linking to a dylib
  • Index(es):
    • Date
    • Thread