• 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: XCode 2.1 adding a library path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 2.1 adding a library path


  • Subject: Re: XCode 2.1 adding a library path
  • From: Chris Espinosa <email@hidden>
  • Date: Mon, 13 Jun 2005 11:02:00 -0700


On Jun 13, 2005, at 9:55 AM, Michael Hanna wrote:

Hi all, I'm compiling with libpng, which has been installed in /usr/local/lib . After turning ZeroLink off(by changing the active configuration), I get these errors at build time:


/usr/bin/ld: Undefined symbols:

_png_create_info_struct

_png_create_read_struct

_png_destroy_read_struct

_png_get_IHDR

_png_init_io

_png_read_png

_png_set_sig_bytes

_png_sig_cmp

collect2: ld returned 1 exit status



I then tried adding to project get info -> build -> Library Search Paths -> /usr/local/lib


did a Clean, then Build, but I get the same results. I have #include <png.h> of course.


How do I get the compiler to find these libraries with XCode? XCode 2.1, 10.4.1



You don't seem to actually be linking with libpng:

- when using ZeroLink, you don't link at all, so not getting link errors is expected
- Adding a Library Search Path for /usr/local/lib tells Xcode where to look for libraries you specify for linking, but it doesn't indicate which ones
- #including  a header file tells the compiler to compile with headers, but doesn't tell the linker anything

You need to choose Add to Project, type /usr/local/lib, find libpng, and click OK.  Then check the target(s) you want to link to that library and click Add.

Chris
 _______________________________________________
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: 
 >XCode 2.1 adding a library path (From: Michael Hanna <email@hidden>)

  • Prev by Date: Re: Internal Error Loading Projects After Installing 2.1
  • Next by Date: Re: New PowerBook won't run Panther, xCode 1.5
  • Previous by thread: XCode 2.1 adding a library path
  • Next by thread: Shark 4.2 problem: "-[GRGradientColor addColor:]: selector not recognized"
  • Index(es):
    • Date
    • Thread