Re: Newbie simple Xcode Question
Re: Newbie simple Xcode Question
- Subject: Re: Newbie simple Xcode Question
- From: Brent Gulanowski <email@hidden>
- Date: Sun, 7 Mar 2004 16:25:03 -0500
On Mar 7, 2004, at 1:06 PM, Scott Buchanan wrote:
> Hi,
>
> I'm trying to re-compile some simple command-line calculation routines
> I used on Solaris on OSX. I thought I'd use Xcode and learn as I go.
> I have a simple library and then some routines that call that library.
> I created a Xcode project for 'BSD Library' and compiled the library
> creating libnr.a seemly just fine. I then created a simple Xcode
> project called 'fit_exp' whose 'main' calls the routines in nr. I used
> the the 'standard tool' template and edited main.c as needed.
>
> If I put the source code from the library directly in the fit_exp
> project everything works great. If instead I put the library libnr.a
> it doen't seem to link. The library routines are reported as missing.
>
> ld: Undefined symbols:
> _dmatrix
> _free_dmatrix
> _mrqmin
>
>
> libnr.a is compiled as a static library. I've looked all over the
> Xcode menus and help for the linker flags and where to change them and
> am lost.
>
> I could do this command line but I'd like to understand the Xcode for
> this. Unfortunately I can't find any example this simple :&)
>
> Thanks in advance for any help.
First, I'll mention that the answer is in the docs, in case you want to
look there first.
There are two ways. Both require editing either project or target
settings available by using "get Info" or "Inspector", either by right
clicking on the project/target, clicking one of the blue circle with an
I in it icons, or using the menu commands. Choose "build settings".
There are settings for search paths (libraries, frameworks, include),
and settings for "additional linker flags". The command line flags can
be simply put in the additional linker flags to get what you want
easily. Alternately, you can add the library using the Project->Add
Frameworks... menu item and just set the search paths, although the
Finder pretends that /usr/local/lib/ and other places do not exist
without some monkeying around, so just setting the linker flags
directly is usually easiest.
--
Brent Gulanowski email@hidden
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.