• 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
/usr/bin/ld: Undefined symbols: _xZero
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

/usr/bin/ld: Undefined symbols: _xZero


  • Subject: /usr/bin/ld: Undefined symbols: _xZero
  • From: Nelson Santos <email@hidden>
  • Date: Mon, 4 Jun 2007 01:57:58 -0400

Hello all,

I've seen some posts about this issue on the list before, but I couldn't find anything that helps.  Hopefully someone can enlighten me.

I downloaded and installed a C math library (hpalib) on my system to use in my Objective-C Cocoa programs.  I built the library using make (and the included makefile), without any problem.  The 3 .h files are located in /Developer/Headers/hpalib/include.  The single .a file is located in /Developer/Headers/hpalib/lib.

In my test Xcode project, I've set the following build preferences:

User Header Search Path: /Developer/Headers/hpalib/include
Library Search Paths: /Developer/Headers/hpalib/lib
ZeroLink: Unchecked (this was the default value)

Also, in the Build menu, I've unchecked Allow ZeroLink.

I wrote a small method in my AppController class:

...
#import <xpre.h>
...
- (void)test
{
    struct xpr s;
    s = xZero;
}

I build my project and the linker returns the following message:

/usr/bin/ld: Undefined symbols:
_xZero

Why?  I have the full source code of the lib.  I see that in xpre.h xZero is declared as:

extern const struct xpr xZero;

and in constant.c, xZero is defined as:

const struct xpr xZero = { {0x0, 0x0} };

Looks OK to me.  What am I missing?  This is the first time I am trying to get a 3rd party lib installed and  functional.

Note, removing the s = xZero line results in code that works.  I am able to debug and view the s struct so I know something is working right.

Thanks.
Nelson







 _______________________________________________
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: /usr/bin/ld: Undefined symbols: _xZero
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Anyway to comment a selection?
  • Next by Date: Re: /usr/bin/ld: Undefined symbols: _xZero
  • Previous by thread: Re: Anyway to comment a selection?
  • Next by thread: Re: /usr/bin/ld: Undefined symbols: _xZero
  • Index(es):
    • Date
    • Thread