Objective-c mingw in windows - objective-c

What tutorials cover how to use Objective-C in Windows?
I heard about mingw, but I couldn't configure it. I would like to only create command-line programs because I heard that there is no iPhone/iPad simulator for Windows and I would like to learn Objective-C.

Related

Is it possible to compile Objective-C code on a PC?

I would like to start learning Objective-C for future iOS development. I understand that there are many large hurdles in getting an iPhone app to work on a PC but I'm trying to avoid all of that and just get familiar with the Objective-C language itself without all of the added mobile features.
Is there a way to compile Objective-C programs on a PC to learn just the language without any extra iOS features?
Yes, definitely. Have a look at GNUstep - it's a framework that contains the Objective-C runtime library and most of the Foundation classes. You can learn the language very well by using this package with GCC (gobjc) and MinGW on Linux or Windows.

Can I compile Objective-C code to run across multiple platforms?

We have a codebase for a sync library written in Objective-C. In general it's only using stuff from the Foundation framework (NSArray's, NSDictionary's, NSURLConnection's etc.).
We also use some Cocoa-specific functionality in this codebase: KVO and delegation.
Is it possible to compile this codebase to other platforms, similar to how it's possible to compile C/C++ code to multiple platforms? How should I go about doing this? What tools would I need?
edit: The platforms we're mostly interested in (if possible of course): Windows, Android, BlackBerry, Windows Phone 7
Thanks in advance.
Here is a delightful article from cocoawithlove - Options for porting Objective-C/Cocoa apps to Windows. It atleast answers how to port ObjectiveC to windows.

Objective C on Windows or Linux

I would like to learn objective-c, but don't have a Mac.
How would I compile obj-c on Windows or Linux?
I would prefer Windows, but Linux would be OK.
GCC has an objective-C compiler. You may also want to investigate the GNUStep tools, which provide a clone of the OpenStep APIs (Which Cocoa is based on.)
You can use gcc to compile objective c as suggested by the previous answers. But one thing is if you are planning this for iPhone development then mac is a must as the framework, simulator etc. are not available in other platforms.
http://gnustep.org/ -- no experience using it, but it might be worth a shot.
If you just want to experiment, there's an Objective-C compiler for .NET (Windows) here: http://www.qckapp.com/index.html?p=ObjC

Is it possible to use Cocoa classes in an app that runs on Linux

I am need to parse a pdf file. I would like to use objective-c and Cocoa classes to do so, but I need the resulting application to run on Linux. Is this possible? My experience to Objective-C revolves around the iPhone so I'm relatively new to Cocoa. Thanks.
Cocoa is Mac and iPhone only, but you could use GNUstep, which is based off the same OpenStep Objective-C API as Cocoa, and PopplerKit for PDF reading.
In addition to GNUstep, there's Cocotron which cross-compiles from Xcode running on a Mac. If you can develop on Xcode, then it's an option.
No, Cocoa is specific to Mac. You can use Objective C on Linux, but I doubt there's much library support. You might have better luck finding a PDF parser for Linux (ghostscript might have libraries) that also works on Mac.

Objective-C and Windows

I am currently in a class that is developing applications in Objective-C and Cocoa. I was wondering if there was any way to build and compile Objective-C applications on Windows Vista. During class, we are able to use the Mac machines provided to us, but I was hoping to do some work outside of class, and I only have a Windows Vista machine available to me. I have installed GNUStep. I am looking for a GUI or an IDE that I could use. I have Eclipse, and I tried to install ObjectivEClipse, but that is only for a Mac machine too. Any other suggestions? Thanks.
The compiler is no problem, since gcc includes an Objectve-C frontend. You could simply install Cygwin and use it. the issue is about libraries.
The Cocoa system is very Apple proprietary; but it's a descendant from NeXTStep. For a while (when NeXT was even deeper in debts than Apple) it was named OpenStep, and available as a shell around the NT kernel. Around that time, the GNUStep project was started, and it seems it's still there.
Note, however, that any xxStep libraries gives only a NeXT-like GUI, very different from modern macs. Also, a lot of the newer capabilities are not only new GUI; but new APIs too and these won't be found there.
in short... it's easier to go with a mac.
GNUstep itself offers ProjectCenter, which is a take-off of Project Builder, the NeXTstep IDE that Xcode is derived from. It also maintains the Interface Builder knockoff GORM.
Also, you'll want to bear in mind that GNUstep is a bit limited compared to Cocoa (just because Apple has a whole paid professional development team working on Cocoa full-time and GNUstep does not) and GORM uses a different format from Interface Builder, so if you're taking a class, there may be some Cocoa assignments you won't be able to do with it.
Under the heading of desperation measures:
It's old school but if you have a friend with a mac, you could telnet into the mac and run the dev tools there. You would code in an editor on Vista and then up load to the mac to compile.
That would only let you see the results of command line apps but it would better than nothing.
If the macs in your school lab are accessible you could just screen share from your Vista box. That's another long shot.
Might be easier to beg, borrow or steal a Mac mini.
The Cocoa frameworks are only available on Mac. For anything else, you'll have to use GNUStep.