Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Using C Library (Swiss Ephemeris) in Xcode

Using C Library (Swiss Ephemeris) in Xcode
Thread Tools
DayLateDon
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Sep 17, 2008, 03:58 AM
 
Hello ...

I am looking to build an Xcode project using the Swiss Ephemeris library to calculate planetary positions. I've never tried using a third-party library like this --which involves just a dozen or so ".c" files and a handful of ".h"s-- and I don't know how to make Xcode recognize the function definitions and such. (The ".c" files have no ".h" files to #import.)

Given that it's nearly 3 a.m. here, I'm guessing that this is either a lot easier, or a lot harder, than I'm making it out to be ... I just don't know which.

Any pointers greatly appreciated ...
     
szymczyk
Fresh-Faced Recruit
Join Date: Aug 2005
Status: Offline
Reply With Quote
Sep 17, 2008, 03:32 PM
 
I haven't used the Swiss Ephemeris library, but to use third party libraries in Xcode, you add the library to your project and include the library's main header file in your source code files. If you're using Xcode 3.1, I have instructions on adding libraries to your project. If you're using an older version of Xcode, you'll have to add the library to your project by choosing Project > Add to Project.

If you're getting linker errors when you try to build your project, read this article on linking libraries in Xcode. One thing to note in the article if you're using Xcode 3 is there is no Edit button to click to add a search path. Double-click the build setting to add the search path.
Mark Szymczyk
Author, Xcode Tools Sensei
http://www.meandmark.com
     
DayLateDon  (op)
Dedicated MacNNer
Join Date: Nov 2000
Status: Offline
Reply With Quote
Sep 18, 2008, 12:49 AM
 
Hello ...

My thanks to szymczyk for his help!
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 11:30 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,