Hi Jerry,
Include paths can be added to any Xcode project or Target (assuming
you are trying to build it as an Xcode project and are not using the
Organizer, which is even simpler). Try something similar to the
following:
1) Launch your Xcode project
2) On the left hand side in the Groups and Files Pane at the very top
of the view is a blue Xcode icon with the name of the project next to
it. Double click that, or click it once and press the Info icon in the
Xcode toolbar.
3) In the window that pops up switch the tab item that says "Build"
4) In the search bar in that window type "Header Search Paths". That
will narrow down the number of options in the build settings window.
You want the one that says Header Search Paths.
5) Double-click in the blank column next to header search paths and a
drop down will appear. In this drop down you can include the path to
the header files you want to include. Click the + button to add a path
and then in the new field type:
/sw/include/gsl
OR
/sw/include (and then check the recursive button).
At that point you should be able to build and go and it will find
the appropriate headers.
A lot of options can be configured in the build settings window
either project wide or for specific targets. They can also be set
depending on what mode you are running in, Debug or Release. It can be
confusing at first because there are a lot of options, but once you
get used to the IDE, you'll find it to be very powerful and flexible.
We have some tutorials over on MacResearch.org for Xcode, the
Organizer and Mac OS X programming in general.
Hope that helps,
Dave
On Sun, Mar 23, 2008 at 6:58 AM, Jerry Gagelman
<email@hidden> wrote:
>
>
> Dear Everyone,
>
> I just got a MacBook running Leopard. I want to try out the Xcode IDE to
> decide whether I like it or not. I'm having trouble building objects and
> executables that already compile and link on a unix system. The problem is
> with the GSL libraries. On a typical system (like the one where I work), the
> path for the gsl headers is
>
> /usr/include/gsl/
>
> but with OS X it's
>
> /sw/include/gsl/
>
> >From a shell terminal I can compile my code with a command like
>
> $ gcc -B/sw -c math.cpp -o math.o
>
> or
>
> $ gcc -I/sw/include -c math.cpp -o math.o
>
> They both work perfectly. When I try to build the object math.o using
> Xcode, I get an error like
>
> error: gsl/gsl_blas.h: No such file or directory
>
> triggered by the line #include<gsl/gsl_blas.h> in my source file.
>
> There was some discussion about linking against GSL on a thread here
> entitled "Document Or Core Data Science Apps", but none of the suggestions
> there work for me. I suspect my problem is finding the right build setting
> option in Xcode for the target math.o.
>
> I want to emphasize that everything works perfectly in OSX using the
> command "make -f Makefile" from the shell with the Makefile edited
> appropriately. My intent here is to learn how to use Xcode for something
> more than a fancy text editor.
>
> Any suggestions?
>
> Jerry
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Scitech mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
--
David W. Gohara, Ph.D.
Center for Computational Biology
Washington University School of Medicine
http://gohara.wustl.eduhttp://www.macresearch.org
314-362-1583 (phone)
617-216-8616 (cell)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Scitech mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden