Linux for Win32 Development?
A nameless member from Clan Anonymous Coward asks: "I've been considering installing Linux as the primary system on my laptop, but I question how suitable it is for Win32 development. I use Delphi as my primary development environment, and have considered running WinNT under VMWare (or possibly Delphi under Wine). What experiences have you had with developing Win32 apps under Linux, using Win32-based tools?" This is a neat thought. Has anyone had any success with this?
For a while I used VMware on my trusty U2W-SCSI PII box and found the whole experience a little bit too sluggish for daily use (I tried just about every flavor of Windows I could, including 2000). The processor benchmarked at around 333mHz inside the VM, but memory allocation and disk I/O on the virtual disk dragged down performance (yes, even on 10,000 RPM Ultra2 SCSI).
Here's my proposal, assuming you have sufficient disk space:
- Divide the laptop's hard drive into at least 2 partitions; use the NT Boot Loader or LILO to dual boot between the two.
- Since dual booting every time you want to access another OS gets annoying, purchase a copy of VMWare. There's an option to mount physical partitions like virtual disks, so you should be able to access either NT from Linux or Linux from NT like you were booting to the partition (albeit slower). This could allow you to run both Linux and Windows applications at the same time, and would allow for an elementary form of filesharing using Samba and the vmnet kernel module. You get better I/O performance this way too, which you're going to want on a laptop drive.
- Finally, go grab some filesystem drivers that can read Ext2 and NTFS/FAT. Read-only NTFS (and experimental read/write) is already in the stable Linux kernel. The full list of supported filesystems for Linux is in the Module-HOWTO on your local howto site. For any other OS, check out the Filesystems HOWTO. This document is a "Filesystem map" that maps many types of filesystems to host OSs - it has just about every combination you could ask for. This will allow you to bypass VMware if you just want to view or edit files on the other OS's partition.
I think this method will prove more productive and more beneficial in the long run. Windows is still the right OS for Windows programming - this doesn't mean you can't mix linux in on the same machine, though.43rd Law of Computing: Anything that can go wr
I have a fairly simple machine, PII 333 with two 4gig harddrives. I have it dual booted with Linux (Redhat 6.0) and NT 4.0 with LILO being the bootloader.
Here's the interesting part: when I boot under NT I can use VMWare to get at the raw Linux partition, and when I boot under Linux I can use VMWare to get to the raw NT partition. Each OS has a specific configuration depending on whether it's a guest or host (using Hardware Profiles under NT and VMWare's dualconf under Linux).
Then it starts getting complex with host-only networking under VMWare for each environment. I actually have 5 different IPs for my one machine:
So while I have NT as a host, I can use samba to send files to Linux and then test them out. As far as development goes on NT, I have Visual Studio 6.0, Borland's free compiler, and Cygnus's cygwin (with mingw32 built under cygwin). I also have cross tools under cygwin that target Linux and MSDOS (djgpp).
When I use Linux as a host (99.5% of the time), again I can use samba to send executables to the NT guest and try them out *immediately* after compilation. This is a plus for libraries such as SDL, etc. I use pgcc-2.95.2 targetted to mingw32, cygwin (for the hell of it), ms-dos, and Sony PlayStation.
The main reason I use this setup is for hardware/processor feasibility, I have a TNT2 Ultra that isn't supported in any way under VMWare, therefore booting NT means I get 3DSMax, etc. that takes full advantatge of my hardware. Also, I have an ISA card that talks to my PlayStation, and the majority of dev-tools (with the major exception of psxdev) for the PSX are Win32 only (VMWare can't handle non-standard hardware).
How I set this up:
Install NT on the second harddrive
Configure all drivers, etc. for NT (might want to wait for this step to make creating Hardware Profiles easier)
Install Linux on the first harddrive w/ LILO
Setup VMWare on Linux to talk to NT as a guest (using raw disk partitions)
Boot *NATIVELY* into NT and copy your existing profile into a new Hardware Profile (System Control Panel)
Disable any devices in your new profile (call it "Virtual Machine") that VMWare doesn't support (Devices Control Panel)
At this point if you want you can setup VMWare for NT to access Linux as a raw partition
Boot into Linux and test your NT under VMWare, if some drivers fail, disable them under the Devices Control Panel
If you installed VMWare for NT, tweak your Linux dualconf configuration (I had to manually add a condition for switching the links to the X server)
Setup Host-only networking, samba, etc.
I know I didn't go into any detail, I don't have the time to write everything out and I'm not at my machine so I might have missed something. I'll post a couple articles at my site, etc. when I have some time (this weekend?).
Marcus