Win32 Development Tools
Is it possible to cross-compile a native iPhone application from a Windows PC platform? If so, which tools would be neccesary? Frameworks? Compilers? IDEs?
If not, would it be possible (not just in theory) to develop tools to make this possible?
I've been googling, browsing around http://iphone.fiveforty.net/wiki, and poking at http://developer.apple.com/ for over a month now, and yet to no avail.
So far -- and correct me if i'm wrong -- I understand that:
- Mac OSX runs over the UNIX BSD subsystem
- Objective-C, XCode, Cocoa = Development tools for mac users (no Win32 support)
- iPhone development requires the Mac OSX CoreFoundation Framework
- iPhone development currently requires iphone-binutils
- A watered-down version of Mac OSX is the primary OS for the iPhone
So far, I believe i'll need:
- A functional C compiler (with gcc, I think)
- An optional IDE for the C compiler (I have VC#8, VC++8, Dev-cpp)
- Common knowledge of Mac type definitions (and possibly a homebrew types.h for Win32 debugging)
- Possible common knowledge of the arm-apple-darwin Assembly Toolchain
- Further reading material (hopefully free =))
- A lot of caffiene/nicotine
- A miracle or two
I've been programming on the Windows platform for over a decade. Started in the good ol' days of 16-bit GW-BASIC and BASICA, ended up in 32-bit Visual Studio.NET and Borland ASM. Unfortunately, there aint no turning back now, despite my newfound love for Apple. And i'm too poor to afford a new mac computer, anyhow. So, any help would be much appreciated!
Easy way: use virtualisation to get an linux running inside your windows. (Don't worry, performance loss is negligible for computations)
Harder way: set up the toolchain using cygwin, so you'll have native toolchain under windows. If you succeed, share it; but it may happen that the patchs if the iphone's gcc are not compatible with cygwin and you'll have to fix things yourself.
As for the other questions:
Software, everithing except the ide is in the toolchain.
IDE, you can use the one you want, but you'll maybe end (like me) using the IDE as a cool text editor and pop up a console to compile things.
Langages: I'm not even sure you'll have to use ASM, C++ and/or OC should be sufficient.
Doc: the biggest source of doc will be the apps that already exist, you cas download/ask the source for most of them.
Caffeine: yes indeed...
Oh thank god, I'm not alone with this task... :)
I can't seem to find a decent, working Linux emulator for Windows. And the only Win32-compatible Mac OSX emulator ive come across is CherryOS, which is no longer under development, nor support. Still, I found & downloaded a CherryOS torrent and installed it about a month back, but it required a full OSX ISO image in order to install (which seems reasonable). Once I got my hands on an OSX installation CD, CherryOS mysteriously crashed upon every load thereafter before I had the chance to install OSX, irregardless to whether or not a reinstall has taken place!
That's when I found out about Cygwin. Despite the fact that there are endlessly distinct differences between DOS/Windows vs UNIX, and that learning all the ins and outs of it is truely a daunting task to say the least, the knowledge of a true working UNIX subsystem on a Windows platform was a very comforting fact that it actually IS possible to develop apps for the iPhone via Windows. Its just seemingly unexplored territory right now. I intend on changing that...
So, seeing as how im still learning UNIX standards, could you walk me through the steps you took to set up the toolchain on your system? What OS platform did you use, anyhow? Do I need a gcc compiler to use the toolchain? I suppose at this point, any info could be considered useful. Appreciated!
Ok, I have not a lot of time to help you right now, but I'll give you the next steps. If you have any big problems, come back and I'll see what I can do. (Sending a PM was a good idea)
Step 1: Forget things
Forget about cygwin, cherryos, emulators and MacOSX
Step 2: Download latest (not beta) Ubuntu iso, and latest (not beta) VirtualBox (for windows)
Step 3: Install VirtualBox, create a new VM, install Ubuntu inside, make sure everything work (and install all updates)
Step 4: Try to compile and install the toolchain inside Ubuntu. If problems go to IRC, but they have lot of success reports (and it's officialy supported)
Don't ever mention Windows, it's out of the equation and will confuse people.
Step 5: Compile samples, fix problems if needed.