On Oct 21, 2013, at 6:26 PM, Koen van der Drift <koenvanderdr...@gmail.com> 
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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to