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.
I try to use objective-c in linux.
Which version of iOS is "supported" when using compilers like gobjc++, gobjc, libgnustep-base-dev
None. I don't know of any non-Apple tool chain that can be used to compile Objective-C for iOS devices. For a start, you at least need an ARM cross compiler.
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.
I would like to test Objective-C, but I don't have a Mac. Is it possible to program Objective-C in Windows? Another possibility is to do it in Linux. Does anyone know if either is possible?
Yes, the GNU Compiler Collection contains an Objective-C frontend.
It will easily work on Linux and can be used on Windows too if you workaround with some binary distributions like cygwin or gnustep.
But I don't think you will have any kind of Cocoa API, you will have just the ObjC syntax.
I'm learning Objective-C and my friend have a real Macintosh IIci, that uses a Mac System 7(specifically 7.5.5 with a 68k processor) and I've installed Metrowerks C/C++ IDE(I think it's the version 1, but I don't know), but i didn't tested it, then i want to know one thing: It's possible to develop in Objective-C using NSObjects/Objects and AppKit or something like this on it? Thanks.
The short answer, as Stephen says, is no. But, just for fun, I started thinking about what you'd have to do to actually make that work.
1) You'd have to make gcc run on the 68k (gcc is the compiler that speaks Objective-C; you could probably substitute llvm for gcc, but let's not get too crazy). This is no mean feat. A quick look at the latest gcc builds does not show anything for that platform (unsurprisingly). I'm not an expert on gcc, but I bet it uses gcc-specific extensions and modern C so getting it to compile with an existing 68k compiler will probably be a non-starter.
So the first step for this will be adding an 68k back-end to gcc. This will allow gcc to spit out code that will run on a 68k. You could then use an x86 build of gcc with 68k support to cross-compile a new gcc binary that will actually run on your ancient Mac.
Having never messed with gcc before, I suspect that this task would take me about two-three years. Maybe more. but still, it's not impossible.
2) Once you've got a modern version of gcc that you can run on your 68k machine, you can use it to cross-compile for x86 or PPC. (Since you're talking about AppKit, you will never be able to actually RUN any of these programs on your old computer. All testing will have to take place on a more modern machine.) You now have to get all of the libraries and headers for Cocoa/Foundation/AppKit/libc/etc from your target machine (a PPC or x86 Mac) and put them somewhere that the gcc on your 68k can find. This will probably take a good 6 months of finagling to get right. But again, it shouldn't be impossible.
It might not be legal, though. As far as I know, the license agreements for OS X (which contains Cocoa) and Xcode will not let you move those binaries around willy-nilly to any machine you want. You would want to speak to a competent attorney before doing this as no one wants to get a visit from Interpol.
3) I think you're done at this point. You can write Objective-C/Cocoa code on your Mac IIci, compile it for a PPC or x86 Mac, ship it off to an OS X box using your favorite method (I've only been a Mac guy since 2005 so I don't even know the connectivity options on the IIci), and test and debug it rather painfully.
At this point, you have access to a Mac running OS X on either a PPC or x86 chip. And you will wonder why you don't just do all your development on THIS machine instead. And since you've spent a few years getting your IIci development environment set up, buying an old PPC Mac for development will be cheap.
Still, it could be a fun idea. It'd probably get you on the reddit front page if you pulled it over. (Though, honestly, it'd be easier to just fake it for YouTube if that's all you're after.)
Short answer: no.
Objective-C became the lingua franca of mac development with OS X, which went into beta 10 years or so after that computer shipped. Most development for pre- OS X systems was done with C or C++.
Without OS X, you won't have any of the system libraries or headers to link against, and the Metrowerks compiler won't know anything about the Objective-C syntax or runtime extensions to C.
To top it off, the Objective-C frameworks are built for PowerPC (or now, Intel) macs, whereas the processor in that machine uses the older 68k architecture.
gcc was still being compiled for 68k Amiga in the early noughties, so there might be some chance to get it working on 68k Mac OS. I believe Objective C extension were available from at least the early 90s for gcc.
Another option is to use 68k Linux. There is an port of Debian 4.0 (etch) for 68k, and a current effort to revive it, so you could likely get a fairly recent version of gcc running.
There is also the possibility to cross compile.
The contemporaneous C environments (no idea if any had supporting Objective C) were Think C (later Symantec C++) and Apple's Macintosh Programmers Workshop. In theory, you might get one of these to compile an objective C supporting version of gcc.
No, it's not possible they are just too old to my knowledge.