Is it possible to execute Objective-C programs in Windows? - objective-c

I googled a lot. Some people are saying do this. Some are saying it's not possible. Install Mac OS X on a virtual machine, etc., etc.
I have a simple question.
Is it possible that I can practice Objective-C programming on a Windows 7 machine?
If yes, how? Please, if possible, provide me with a necessary link. My ultimate goal is to go for iPhone development. But right now I can't afford a MacBook.
So is it possible?

Objective-C, the language, definitely yes. At the very least, GCC (GNU Compiler Collection) compiles Objective-C just fine. You can get either Cygwin for the full POSIX-like environment, or MinGW which gives just the GNU toolchain for programming to the Win23 API
But, iPhone needs the Apple API, which is totally proprietary; if they say 'No Windows', then it's just not available for Windows
Of course the iPhone API is based on Cocoa, which is based on NextSTEP. You can get the feel of the API with OpenSTEP.
But it's not iPhone.

Yes you can compile Objective-C on Windows. But for iPhone development this question was already asked.
And there are several similar questions about iPhone development here on Stackoverflow, just search for it.

It's worth taking a look at Cocotron— that aims to implement a cross-platform Apple-compatible version of the core NeXTStep libraries, the FoundationKit and ApplicationKit. Windows included.

GCC (http://gcc.gnu.org/) can compile Objective-C.

The answer is yes, but it will probably require quite a lot of work on your part:
www.gnustep.org
www.cocotron.org

This page on StackOverflow, answer 4. It worked great in my case.
Objective C for Windows

Related

Compiling Objective-C app for Linux (API coverage)

I might be asking something strange here, but I'm unsure where to begin. The thing is that I am considering writing a command line tool on a Mac using Obj-C and the Foundation classes.
But there is a very big risk that I would like to be able to compile it for different Linux distributions to run as a server app in the future.
I understand that it is not a problem in itself to compile Objective-C for Linux, but what I don't understand is the API coverage.
As I have understood it so far I can use GNUStep to compile for linux, but is there a good way for me to get an overview of the API coverage? What I mean is, if I use a class that has been added to the Foundation framework in OSX Lion lets say, how big is the risk of that not being available in GNUStep at that time?
I hope I am asking a question that you guys can understand, basically I want to avoid writing an app that can theoretically be compiled for linux, but not in practice because of missing classes etc.
Thanks!
An opinion: The risk is fairly high. GNU Step is an open source project and dependant on its volunteers to keep it up to date. OS X Lion has a small number of additions to Foundation and AppKit.
Your best option if you want it for *nix in the future will be to write it in generic C/C++ and then thinly wrap it in an NSTask if you want a GUI.
You should be able to check if the API's you're using are available by consulting the GNUStep base API docs.
You may want to target GNUStep as your base if compatibillity is a big concern. Compiling for mac should then be rather trivial, compared to moving the code the other way. Of course you always have the option of helping inplement whatever is missing from GNUStep too.

Setting Up Objective-C with Kdevelop

Does anyone know how to setup Objective-C with KDevelop? I've been searching and searching for a supposed "patch", which is supposed to integrate support in with the IDE, yet I haven't been able to find it.
This has been partially treated on StackOverflow already. Apart from the discussion over there, I sometimes use Emacs besides Xcode. I use Emacs for most of my editing and coding needs, and it comes with a nice Objective-C mode. Autocompletion in Xcode is the big selling point, but I just found out there is an answer on Stackoverflow as well. I haven't tried it yet, but it might be worth checking out.
I would go to GnuStep.org, and ask this question on their mailing list. They're the guys who do the most obj-c development on Linux that I know of.
I'm also interesting in developing on Linux using Objective-C. Due to the success of the language on Apple platforms, there are an increasing number of skilled Objective-C Developers whose efforts could benefit OSS if only the gap in Linux tooling were closed.
GNUstep is a fantastic effort and, along with LLVM and Clang, goes much of the way to achieving this. But: there is no modern IDE which supports Objective-C in Linux. ProjectCenter is the official GNUstep IDE but honestly it is showing its age.
JetBrains seem to be in the best position to change this situation: they are producers of the foremost Objective-C IDE for iOS: AppCode, and have just released a C/C++ IDE for Linux called CLion. If enough interest is shown, perhaps they would consider integrating Objective-C support from AppCode into CLion. Compiling against GNUstep, this would breathe new life into cross-platform Objective-C development.
I would encourage anyone interested in this possibility, to sign into JetBrains request tracker and vote for this issue: https://youtrack.jetbrains.com/issue/CPP-3353

Can we compile objective c on windows?

Can we compile objective c on windows platform?
Quick answer: no, not to any useful degree.
Long answer: Objective-C is just a standard language, and GCC compiles it just fine. But when most people talk about Objective-C, they are including Apple's (formerly NEXTstep) libraries, as the bare language isn't too useful without them. There are projects around to let you use these libraries on non-Mac systems, for example GNUstep, but from my experience they are immature and more trouble than they are worth. I haven't looked recently, but I wouldn't spend too much effort trying to get it to work.
If your framework needs are basic, you can try cocotron, but I understand it is not yet "there" in many areas. http://www.cocotron.org/

What languages besides Objective-C will generate application code that works on an iPad?

I would like to write an app for the iPad but I can't stand Objective-C.
Is there a language generator that would spit out Objective-C but let me write my iPad application in another language?
I've heard a little about MacRuby and am curious whether it could be used this way. Any other similar projects in other languages?
C# with MonoTouch.
JavaScript with Appcelerator Titanium.
Flex with ELIPS Studio 3.
Python with PyObjC (for jailbroken iPhones though).
Apparently Lua is an option.
John McIntosh uses Smalltalk on the iPhone. For instance, his Mobile Wiki Server app.
No computer anywhere (well maybe some) cares what language you write your programs in. Heck, you could hand-write machine instructions if you were patient (and crazy) enough. As long as you can figure out how to interact properly with the system call interface and the ABI, you can do whatever you want.
You could use Corona, Torque, or Unity. These all have advantages and disadvantages compared to using the standard Objective-C SDK, but really, if it's about the language itself, it's hard to see how you would be better able to "stand" the languages supported by these three than Objective-C.

Game programming on Objective-C and linux

I'd like to give Objective-C a try in game programming. The problem is I'd need some tools and libraries for this.
First thing that comes into mind I need is the GUI and graphics library.
What choices do I have?
There are Four non Mac implementations of OpenStep/Cocoa type Objective C platforms:
OpenStep/NextStep : Openstep/NeXT support machines only - Discontinued.
p..... can remember name or find it on web - it's out there somewhere ! - Linux
Cocotron - Windows only
GNUStep Linux/Windows
GNUSTep is the way to go for Linux... I mention there others because 2 and 3 are available in source and they can be used to patch holes in code the GNUStep doesn't have and they might.
When it comes to Graphics library - you may have problems because Apple moved away from the old OpenStep APIs and has kept evolving their APIs far faster than the GNUStep people can play catch up. There is no support for the latest graphics libraries such as Core Animation.
As Objective C is C and C++ friendly you can use any of these libraries as is, or by making the Objective C friendly by making a wrapper.
You may or may not want to be Mac compatible and do versions for that so it may not be important.
If you do you might want to do a Linux Wrapper for something like OpenGL if it is missing, which I think it is but have a check yourself....
There are Linux development tools including a project IDE and GUI builder for GNUStep on Linux.
Tony
I believe you're asking for GNUStep.
SDL is a C library which is popular for game programming.
If you're looking for Foundation/AppKit stuff you can also look at Cocotron. I've never tried it though.
Supporting SDL there are Objective-C bindings here. However since Objective-C is a thin OO layer on top of C you can use most of the existing C libs for game development, SDL, Clanlib, etc...