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
|