1

Is the gnu objective c compiler for windows the same as the compiler for Mac OS X (and Ipad)?

I want to write some code on windows and run it on the mac and ipad, objective C seems to be the best way to go for the Mac/Ipad but is the gnu compiler the same? I know the libraries cocoa etc are not available but this is not an issue we'll be writing different interface code for each platform (please no comments about this is not the right way etc).

tia, Dave

daven11
  • 2,706
  • 3
  • 22
  • 40
  • Also refer this question for iPad specific coding http://stackoverflow.com/questions/2159951/is-there-a-specific-xcode-compiler-flag-that-gets-set-when-compiling-for-ipad .Good luck – Reno Dec 02 '10 at 09:17
  • How do you get the frameworks to work with Windows? You might work without the GUI things like UIView, but NSArray, NSString etc seems essential. Is there a compatible replacement? – Eiko Dec 02 '10 at 09:24

1 Answers1

0

The compiler is more or less the same, but the runtime systems are different. If you don’t use the new features from Objective-C 2.0 your code should work fine with both runtime systems. If you want to use the new features you have to use a different runtime. You can find more information here on the GNUstepWiki.

But you still need a framework that provides basic objects like strings, arrays, dictionaries and so on. You could use this part from The Cocotron, a framework that tries to make all of Cocoa available on Windows, Linux and other platforms.

Sven
  • 21,790
  • 4
  • 48
  • 70