Dan
Dan

Reputation: 119

Using a cocoa command line application in Linux

I'm writing a command line tool in Objective-C (within xCode) that uses the Foundation Framework. I have to use Objective-C because I need to unarchive objects previously archived by NSKeyedArchiver.

My question is, I'm wondering if I can now use this compiled application on my Linux web server.

I'm not sure if there would be a runtime issue or if the executable could be its own standalone program that could actually run on my Linux server.

I'd appreciate any feedback.

Upvotes: 3

Views: 1290

Answers (3)

starbugs
starbugs

Reputation: 992

I have provided a wrap-up on how to compile a command line tool based on the Cocotron Foundation framework on my blog.

This does also include a step by step guide on how to cross compile the Foundation framework for Ubuntu Linux.

Hope this is helpful!

Upvotes: 2

Nektarios
Nektarios

Reputation: 10371

You can use The Cocotron to build your app targeted to Linux. It is an actual Cocoa implementation meant to fully interoperate (although it's not 100% complete of course), as opposed to GNUstep which is not meant to work that way. I use this and it is awesome.

Upvotes: 3

Ole Begemann
Ole Begemann

Reputation: 135550

No, you cannot run a program that was compiled on and for a Mac on a Linux system. So you will have to compile it for (and on) Linux. Apple's Foundation framework is not available for Linux, but have a look at GNUstep, a free and open Cocoa implementation.

I don't know if GNUstep can read archives that have been archived with Cocoa's NSKeyedArchiver, though.

Upvotes: 2

Related Questions