Skip navigation

How to create a static library in Xcode 4.2

1565 Views 4 Replies Latest reply: May 8, 2012 1:25 PM by Resn8tor RSS
Resn8tor Level 1 Level 1 (115 points)
Currently Being Moderated
May 6, 2012 3:16 AM

I need to make a static library from a project that consists of only two files, a c module and a header file.  I haven't used Xcode before, but had no problem figuring out how to create a new project and setting up what seemed like reasonable the build options, and the build reports success.  But no output files are being created.

 

I figured it was time to dig into the documentation, but when I did some searching I turned up several horror stories about not being able to get this to work.  And from people who appear to know a lot more about this than I do.  So I thought I'd ask--is it a problem doing what ought to be a relatively simple task using Xcode 4.2?

 

This is not an iOS thing, just a C function that I need to call from Python.

 

Any suggestions as to how I can get this to work?

iMac 2.7 GHz Intel Core i5 16 GB, Mac OS X (10.7.3)
  • xnav Level 5 Level 5 (6,625 points)
    Currently Being Moderated
    May 6, 2012 12:51 PM (in response to Resn8tor)

    Did you start here?

    Screen Shot 2012-05-06 at 9.50.23 AM, May 6.jpg

  • etresoft Level 7 Level 7 (23,900 points)
    Currently Being Moderated
    May 6, 2012 8:10 PM (in response to Resn8tor)

    What is "the last part"? Building a ".so" library? That is for Linux. Mac shared libraries are ".dylib" files. Python includes tools to help you build extensions. The only part of Xcode you really need are the command line tools. Install those and then follow standard Python documentation for extensions.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.