• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 3rd party executable in iOS project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 3rd party executable in iOS project


  • Subject: Re: 3rd party executable in iOS project
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 21 Oct 2013 19:59:14 -0700

On Oct 21, 2013, at 6:26 PM, Koen van der Drift <email@hidden> wrote:

> The question now is, how do I call the functions in this library?
> On the command line, I need to do something like this:
> foo file1 > output
> With NSTask and companions it is easy to do this, but how can I do that for iOS where NSTask is not present?

If it really is a library, then it has an API with functions as the entry points. Call those.

If not, you’ve got more work to do —  you can rename its main() function to something like “library_main”, then call that from your code with the desired arguments in its argc and argv parameters. But look through the main() function to make sure it’s not calling exit() anywhere, because if it does it’ll quit your app.

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >3rd party executable in iOS project (From: Koen van der Drift <email@hidden>)
 >Re: 3rd party executable in iOS project (From: Jens Alfke <email@hidden>)
 >Re: 3rd party executable in iOS project (From: Koen van der Drift <email@hidden>)
 >Re: 3rd party executable in iOS project (From: Koen van der Drift <email@hidden>)
 >Re: 3rd party executable in iOS project (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: 3rd party executable in iOS project
  • Next by Date: Re: Deadlock during NSCache flush
  • Previous by thread: Re: 3rd party executable in iOS project
  • Next by thread: Deadlock during NSCache flush
  • Index(es):
    • Date
    • Thread