Xmingwin For Cross Generation Applications 108
An anonymous reader writes "Xmingwin makes it practical to generate Windows programs from a Linux server. This column gives a recipe for setting up Xmingwin, outlines the most important reasons for doing so and shows you how to generate executables for multiple platforms -- including Windows DLLs -- from a single Linux source."
Re:Testing ? (Score:5, Informative)
Quick Note (Score:4, Informative)
---
If you just signed up for a new sprint pcs cell phone I can get you a $10 rebate. Email me at jchawk@ my website (tr0n.com) that's a zero in tr0n.
Re:Testing ? (Score:3, Informative)
We have big linux servers that do all of our java compiling nightly (and auto-runs junit tests/etc), but you can't do that for your windows dll's without a seperate box. Now that need is gone.
Re:Surely a security risk (Score:3, Informative)
Placing a .EXE file on a Linux server helps spread virii, because the Linux server won't check to see if the file is infected with a Windows-based virus. This is bad because if the file becomes infected, the infection will be missed.
I'm making the generous assumption that you aren't saying that the Linus system will create an infected executable. Even so, there seem to be some unwritten assumptions here.
First, you assume that there is an infected Windows system. Just about every commercial environment that I'm aware of runs some form of anti-virus software on every Windows-based server and desktop. This means that there is little chance of infection by a known virus. I will readily conceed that unknown infections, such as Slammer, can still be a problem, but that leads to your second assumption.
You seem to think that any Windows-based system with read-access to the file also has write-access to it. This runs counter to the best-practices adopted at most sites. A fundimental rule of security is to provide no more access than is needed to get the job done. File servers generally restrict the average user from modifying static resources. In this case, I would include anyone with a Windows-based system as an average user. Since they aren't running a developement environment, there is no need for them to write to the directories where the software is stored.
So, did I miss something, or did you post of subtle troll?
Re:Xmingwin vs gcc-mingw32 (Score:4, Informative)
We've had this for years (Score:5, Informative)
I've been using a MINGW32-based linux->win32 cross-development environment for years. The same concepts apply as for cross-compiling to different hardware architectures. This is definitely not new software. With properly written makefiles, you can build to target both Linux and Win32 platforms from the same source tree and build environment. Of course you must test on both platforms, but having a setup like this definitely makes it easier to build large projects for both Windows and Linux.
Re:Usually... (Score:4, Informative)
Wine works by reimplementing a part of the Windows API. Mingw32 is a compiler which takes C/C++ programs and Windows libraries and generates Windows executables. Its C/C++ support is just about flawless as it uses GCC; it can link programs against native Windows libraries just like any Windows compiler would; and it produces ordinary Windows executables.
These Windows executables, however, won't run natively on the (Linux) host machine.
Note that this is also not an automated system for writing portable programs; Xmingwin won't compile anything that wouldn't compile on a normal Windows machine. But if you have code that is portable, you can save a lot of hassle by having just one machine to build binaries for several platforms.
Re:A real world example is needed -- Voila! (Score:1, Informative)
BTW, here's a quick and dirty HowTo I set up in response to a request from the SunCoast Linux Users Group (SLUG) mail list a week or so ago.
Ed.
http://web.tampabay.rr.com/ecentan1/xplat/cross
Re:Surely a security risk (Score:4, Informative)
The plural of "virus" isn't "virii." There is no such word. The plural of "virus" is "viruses."
Here's a good explanation from cdknow.com [cknow.com], quoted here in its entirety because the people who most need to read this won't click on a link.
More plural-of-virus resources:
perl.com [perl.com], the canonical and exhaustive source
The alt.comp.virus FAQ [wisc.edu]
Jonathan de Boyne Pollard's Frequently Given Answer [tesco.net]
Merriam-Webster's "Word for the Wise [m-w.com]," January 20, 2000.
Automated builds + a full-featured dev environment (Score:2, Informative)
And when I've used the VC command line tools and called up Microsoft to report bugs I've gotten laughter, at best. They simply won't support anything but the visual environment.
This gives a full-featured development environment using real production quality tools in an environment that won't be blowing chunks every time I try to do something remotely outlandish with the USB bus. I've no problem with having a Windows box beside my Linux box for running the app, I just want a stable, full-featured development environment. Linux cross-compiling onto a Samba mount is closer to that than Microsoft's been in many years.
Re:Canadian Cross-Compiler? (Score:2, Informative)
Example:
Using a Linux-x86 system to build a windows hosted powerPC compiler.
"Canadian" refers to there being three different platforms (parties*) involved: the target platform (powerPC), the hosting platform (windows), and the platform building the cross-compiler (Linux).
* There used to be three national political parties in Canada before those pesky Quebecois formed a national party.