

Start learning Objective-C on a Windows machine - octopus
http://drunkenprogrammerblog.blogspot.com/2011/01/start-with-objective-c-on-windows.html

======
younata
GNUstep is actually not that bad.

The most annoying thing is writing the makefiles. They have good documentation
if you are building a library, command line tool, or application.

If you aren't, then the documentation is basically "this exists. Go read the
source."

I've ported a few foundation tools to bsd.

I'm weird in that objective-c is my language of choice.

~~~
pavlov
I like Cocotron (another open source Cocoa implementation) because it
integrates into Xcode. No separate makefiles to maintain for my Windows or
Linux builds, just another target in the same project as the original Mac
version.

(I realize that cross-compiling to Windows from the Mac is not what the
original post is about -- just thought someone might be interested in that
option as well.)

~~~
younata
I like the idea of Cocotron.

However, I just could not get it to work on compiling for my bsd system.

C'est la vie.

------
oemera
Yeah with GNUStep you can develop Objective-C on a Windows machine. However I
wouldn't recommend that. Not because I want you to buy a Mac. No, it's because
I did exactly the same thing and after a few "Hello Worlds" I tried to develop
an calculator in Objective-C and it worked very well unless I wanted to
compile it on a Mac. My whole code, which wasn't much for sure, was not
working and errors came all over the place. I cant remember why but I was
little nervous to have learned the wrong syntax.

If you don't have a Mac at home try to virtualize it and if you are serious
about iPhone development then go and buy a Mac. Again not because I'm using a
Mac no it is because it will make your live way easier and let's you focus on
development rather than messing around with the environment.

~~~
d_r
That, and you don't need a top-of-the-line $2000+ Mac Pro to develop (I think
those are for video/graphics guys, anyway.)

For example, my main dev box is a Mac Mini (and it flies even with 2 monitors,
Xcode, Eclipse, and a bunch of other things open at the same time.) One could
even grab a refurb to make it more affordable.

------
flashgordon
Mate I am a bit dissapointed (nothing personal). I was really really hoping
(feel free to call me crazy. you wouldnt be the first) it would be an article
on replicating your iphone sdk on a non-mac platform. I managed to get the
same thing done on ubuntu with nextstep but the lack of the cocoa libraries
means you are way way off developing iphone apps on hac-macs.

And yes your title does not mention "iphone" in it so shame on me for hoping
for it. Still id be crazy not to wish for it!

~~~
octopus
Well, in a sense you are right, however before starting to code an Iphone game
you should learn Objective-C and this can be done successfully on a Windows or
Linux machine. My idea is to use the Windows machine for implementing all the
non-graphical part of a simple game, maybe using some simple ASCII graphics.
If you plan to use OpenGL for rendering your graphics on the Iphone you can go
further and implement some of the graphical functionality.

BTW, actually you have access to some of the Cocoa libraries, check the
Headers folder, in my case this is in

C:\GNUstep\GNUstep\System\Library\Headers

on your Ubuntu machine you should probably search for "Cocoa.h" header file.

Also the GNUstep manual claims you can create graphical application with the
provided libraries. I think I will investigate this in a future post.

~~~
Zev
_Well, in a sense you are right, however before starting to code an Iphone
game you should learn Objective-C_

The language is the easy part; you can pick up Obj-C in a day, if you have any
reasonable experience in any other language. The frameworks (UIKit and
Foundation are the important ones) are the harder. You can pick up an old(er)
version of Foundation if you use GNUStep.

 _My idea is to use the Windows machine for implementing all the non-graphical
part of a simple game, maybe using some simple ASCII graphics. If you plan to
use OpenGL for rendering your graphics on the Iphone you can go further and
implement some of the graphical functionality._

Anything other than backend logic and you'll want a real Mac. You'll also want
a real mac if you want anything fancy like Core Data to save everything.

You'll still need to draw your text on screen somehow. You'll want an iOS UI
framework, that isn't available for testing on Windows or Linux. Also, OpenGL
and OpenGL ES are similar, but, I don't know how much code could be used as-is
between the two platforms. My hunch is that there are parts that that can't be
completely cross-platform.

 _Also the GNUstep manual claims you can create graphical application with the
provided libraries._

Maybe for Mac OS X, with AppKit. There's no open version of UIKit for iOS.

~~~
hsmyers
I had little trouble with a first AppKit app after finding
[http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/node...](http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/node6.html)
There are links to additional articles/tutorials suggesting more complexity is
available...

~~~
Zev
My point about AppKit is that AppKit doesn't exist on the iPhone or iPad. You
need to use UIKit instead.

~~~
octopus
You right.

The idea is that there are some people (me included) that are forced to use a
Windows machine a few hours a day. I have an iMac at home on which I
test/compile my code from time to time. From my experience you can safely
implement on Windows about 90% of an application, because I restrain myself to
use only the functions that are compatible with both OpenGL ES and OpenGL I'm
able to implement parts of the graphical components of my app too. This is an
incremental process and I always check,in the evening, on my iMac.

Take a game of Tic Tac Toe for example, you can implement the computer
movements (game AI) on GNUstep. You can also use Blender to create your
graphical objects ... In the end only about 10% of the code actually needs a
real Mac.

------
malkia
Or better find WebObjects 4.5.2 (latest 4.5) - it's OpenStep/NeXT/Cocoa
precursor for Windows. It has gcc, objective-c, debugger, sampler, etc.

Or Cocotron... wait - you can't compile with it on Windows... But if you want
to use through Common Lisp, then ClozureCL started using it.

~~~
rbanffy
I think there was an OpenStep for Windows with the complete NeXT development
toolset - editors and GUI builder. I remember seeing it. It could, of course,
be part of WebObjects.

