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."
ohhh maaaan (Score:5, Insightful)
Of course it also help linux break into places it wasn't allowed before, so i've got to say bravo for that!
Still, should be running BSD
Re:ohhh maaaan (Score:2, Insightful)
I would have thought the more choice and flexibility the better.
Re:ohhh maaaan (Score:1)
On the other hand, Microsoft has done an excellent job trying to migrate developers away from Windows by creating Visual C++, the bastard son of C++. I have yet to find any features in VC++ that would make my job as a developer easier than in gcc. (Step-by-step execution built into the GUI? The few times I would actually need it, the debugger crashes before trapping anything. IDE? If you must, use KDevelop [kdevelop.org].)
Fortunately I've only had to work with this brilliant piece of software for short (a few months) assignments.
Re:ohhh maaaan (Score:1)
invalid c++ code! g++ with --ansi stays
(pretty well) to the standard.
Re:ohhh maaaan (Score:2)
I disagree. Take a longer term view. This makes it easier for them to leave Windows. Nothing happens overnight. And won't happen as quickly as I would like.
While so much noise and attention is being focused on Linux, I think the biggest threat to Microsoft is, once again, sneaking in under the radar. (Step 1: First they ignore you.) The biggest threat: cross-over applications. Stuff like OpenOffice [openoffice.org]. Or the GIMP [gimp.org]. (And yes, I understand that GIMP is not a competitor to professional Photoshop users.)
It seems like more and more cross platform tools and toolkits are available. This was once the holy grail, and there were basically NO solutions. Now, a recent slashdot article [slashdot.org] reveals many ways to develop cross platform applications and gui's.
KDE and Qt are both being ported to Win32 (with GPL license). At some point, expect a flood of KDE applications, including another free KOffice suite, to be available for Windows. Other projects such as The Open CD [theopencd.org] and GNU Win II [gnuwin.epfl.ch] only help accellerate the acceptance of not only free, but open source applications by ordinary windows users.
Eventually, users recognize: hey the OS is irrelevant!
In the meantime, Linux on the desktop will have improved a great deal. Or instead, perhaps the recent RelaxOS [reactos.com]?
Re:ohhh maaaan (Score:2)
Testing ? (Score:4, Interesting)
Winner of Company Most likely to produce Buggy Software....
The people who do this. You can produce work on the Server but to properly test you still need the windows environment. So you have to deploy to that, given that you need a testing environment per developer as well as for UAT and QA then your costs aren't really reduced. The advantages in terms of compile speed are killed in terms of transfer and deployment.
Somebody somewhere clearly things they need this, somebody somewhere doesn't work in large teams and on commercial apps.
Sorry to dis someones work, but I'd be more interested in a decent Open Source windows IDE on windows than being able to do a fraction of the work on Linux... and I loathe MS-Windows. Why do so many Open Source projects have to ape MS rather than take on the beast.
Too many people, too many projects. Come and save us IBM.
Re:Testing ? (Score:1)
Re:Testing ? (Score:1)
Well, isn't the mere existence of programming languages dangerous, because it lets hackers write malicious code? This sounds remotely like something **AA would say. What's more, machine code could be used as a circumvention device for copyright protection. Yes, we better outlaw binary.
(It's called "reduction to absurdity".)
Re:Testing ? (Score:1)
yes [slashdot.org]
Re:Testing ? (Score:5, Informative)
Re:Testing ? (Score:1)
If you need an ide in Linux look no farther. The only issue is the beta linux version was only available on cd the last time I looked.
Re:Testing ? (Score:2)
Of course you do, and I don't think the column anywhere suggested otherwise. The column is talking solely about code generation, not code testing. What this stops is having to reboot a different os, to work with the same app but in a different ide. Which means you don't have to learn 2 sets of compilers and their little idiosyncracies, maintain 2 sets of code with the hassle that entails.
We've got maybe 250 computers in out little department, and before I deploy an app, I test on at least 3 different classes of computer. I would imaging that big companies just have a room of computers with their various base installs and various hardware classes used just for testing.
Re:Testing ? (Score:1)
Excuse me while I decide whether to laugh or cry; I work at a large corporation, on their e-commerce web site (not their main revenue stream) that does over $1 billion in revenue a year. We have no test lab. We have no test machines. We are told to test (on our own NT 4.0 machines), but not spend time on it. Sadly, I've worked in a few corporations, and they haven't been much different.
Re:Testing ? (Score:3, Interesting)
--Microsoft Internet Explorer 5.5 and above on any version of Windows 9x or later
--Mozilla 1.0 and above on Windows or Linux
--Netscape 7.0 and above on Windows or Linux
--Opera 6.0 on Windows
--Konqueror 3.1 on Linux
We don't have any macs in the building, and I just haven't gotten around to walking to one of the other buildings and checking it out. But I will before it goes live.
During the interview season I suppose we'll get maybe 2,000 hits a week from our 750 students. But their eventual livlihood depends on their student jobs now, so this is very important to them.
And people rag on those of us who work for the government instead of private business (which is, of course, perfectly efficient and hires only the best and brightest people).
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.
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.
Surely a security risk (Score:1, Interesting)
Moving files like this, executables which are virii prone into one system or another helps with the spread of virii. Why? It may not look logical at first
What happens is systems that are not running the software can check it for the virii that do run on it. They'll miss the infections coming from the other platform, or perhaps some other one again.
What you end up with is a security risk. It pulls everything down the tubes.
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:Surely a security risk (Score:1)
I wasn't aware that compiling a program risked creating a virus. I certainly wasn't aware that cross-compiling was so dangerous.
I would agree with those that suggest that this doesn't seem to be a sensible way to run a production environment, but it's good for people like me, writing cross-platform applications that I will be porting to Windows. It saves me hunting down someone with the time and inclination to do my dirty work for me, as I gave up on Windows a while back now.
Re:Surely a security risk (Score:3, Interesting)
Or are you saying that Windows executables are somehow more infection prone than ELF or Mac binaries?
It pulls everything down the tubes
Now, now. That's just your inner zealot speaking.
Re:Surely a security risk (Score:1)
Daniel
Re:Surely a security risk (Score:2)
Re:Surely a security risk (Score:2)
Daniel
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.
Re:Surely a security risk (Score:1)
You know what? English has so many transliterated words that later were conjugated improperly that your fight is pointless. I mean, Cambridge and Oxford still fight over syllabuses and syllabi. Bottom line is that language changes often, and rarely follows the rules when it does. You pshawed your English teacher when she berated you about using you instead of one, and I currently bristle at the disappearance of adverbs from the language (He runs fast kills me every time). Let the language move on and evolve.
Please stop, unless you're karma whoring, but then there's little point in that anymore, now is there? Just so you can look at percentage points?
Re:Surely a security risk (Score:1)
As for virii, the word is itself a virus (or rather a worm, since it is spread by the Internet).
Now if we're talking about evolution, let's talk about improvement through evolution rather than deterioration. Verbing nouns, for example, is now accepted because it makes certain constructions a lot more efficient. You might argue that "virii" saves two letters compared with "viruses", thus making things more efficient, but why not in that case save three letters and go for "viri" which is more logical anyway?
Just to finish on, the word "fast" is both an adjective and an adverb (and has been since before the 12th century). Any reputable dictionary will confirm this, so you can stop bristling and live a more relaxed life.
Re:Surely a security risk (Score:2)
Because it means "men."
Re:Surely a security risk (Score:1)
Well I'm glad to hear it means something: that's more than we can say for virii, eh?
Re:Surely a security risk (Score:1)
A hacked native Windows compiler seems to me to be much more likely.
Re:Surely a security risk (Score:1)
Re:Surely a security risk (Score:2)
Re:Surely a security risk (Score:3, Interesting)
It's not compilation, but the CD-mastering. (this used to be in the MS KB, but it seems to have gone).
Re:Surely a security risk (Score:2)
Second. Sophos [sophos.com] supports (or did as of about a year ago) a linux version of their virus software. If you really needed virus scanning its there.
Is it on NetBSD? (Score:2, Funny)
Re:Is it on NetBSD? (Score:1)
Xmingwin? (Score:5, Insightful)
I know this might sound like a troll but I'm serious about this. Projects do themselves no favors by adopting badly thought out names. A confusing name makes it less likely that I will use or evangelize this software. When someone asks me for a recommendation for a software platform for generating Windows executables on our Linux servers I'll be embarassed to say Xmingwin (I work in a corporate environment). Its hard to say, hard for someone to understand when said and worse it sounds amateurish. Its almost as bad as Ogg Vorbis: very geek-cool to use Klingon but the kiss of death in a serious corporate environment.
This isn't a slam on open source - god knows there are too many dumb names in the closed source world - but a plea for developers to think about naming. Its an important part of getting your technology talked about and accepted.
Re:Xmingwin? (Score:2)
I believe the article suggested that the X indicated it generated cross platform executables:
Xmingwin is my label for, "Mingwin run as a cross-generating application." Be aware: you'll also see it spelled as "cross Mingw32," "Xmingw32," or other variations. Usage isn't well standardized at this point.
Since it is a command line compiler, not an X based ide, there's no reason to have x even installed on your box to use this. Well, that I can see.
Re:Xmingwin? (Score:4, Insightful)
Re: (Score:2)
Re:Xmingwin? (Score:1)
it started life as 'MinGW' which meant Minimalistic GNU for Windows.
Re:Xmingwin? (Score:2)
You are damn right. There is no way people are going to be content with this, look at how many different variations of pronouncing leenooks there are.
Are we going to have some more test
Re:Xmingwin? (Score:1)
Pronounced "Joe Smith"
Nice to meeting u.
Re:Xmingwin? (Score:2)
Re:Xmingwin? (Score:1)
Fair point - although its gwernol not gwerwol
The real point is I'm not trying to promote my nickname. Its just a silly identifier chosen because it was available on Slashdot. Xmingwin are trying (I hope) to promote their technology and gain acceptance for it. That's why it doesn't matter that I have a stupid handle on Slashdot but it is a concern that the Xmingwin developers have a project name that might actually discourage its adoption in the broad business community.
Re:Xmingwin? (Score:1)
PHB: "the name is the most important part of the project - I cannot stress that enough"
Re:Xmingwin? (Score:2)
Probably one of the most ridiculous sounding software names I've heard. Tell a manager that you're interested in using "Mozilla", and he'll tell you he's never seen that movie. Software developers, by and large, have *zero* business sense.
Re:Xmingwin? (Score:2)
Re:Xmingwin? (Score:1)
"We'll mail you your last check."
Re:Xmingwin? (Score:1)
I am glad somebody else has noticed this. If it takes off I expect to see a Java version before too long called JXmingwin, a Python version called PXmingwin, a KDE gui version called KPXmingwin a Gnome GUI version called, guess what, GPXmingwin and perhaps the whole thing bundled into a library called libXmingwin. Before too long there will be a fork and we'll have OpenPXmingwin and FreePXmingwin. Perhaps we'll see a cywin port called cygFreeXmingwing. Eventually it will be ported to OSX where it will be called 'iWin'.
Mind you I'll take the name cygFreeXmingwin over 'Mono' any day.
L.
They're just following the Geek Rule (Score:5, Funny)
Re:Xmingwin? (Score:2)
Now I can't get that pronunciation out of my head when I read the word.
Xmingwin is not the official name (Score:2)
As another poster has pointed out, people have been cross-compiling with MinGW (not really "Mingwin") for years, and most people seem to just call it MinGW.
Note that Debian already comes with a MinGW cross-compiler package [debian.org], which will soon be available for non-i386 architectures [debian.org] as well (e.g. cross-compiling from ppc to win32).
Re:Xmingwin? (Score:1)
But then again why not just change the name to "bob", I mean please people all open source project should have should use good proper English phonemes.
F~!@# the l18n stuff anyway...and to hell with linguistic diversity.
I this talk has made me hungry for some good old rou-juan and potatos.
Usually... (Score:1, Troll)
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.
Xmingwin vs gcc-mingw32 (Score:3, Interesting)
- lets see, we have
...
- The mingw-runtime package
- The gcc-mingw32 package
How exactly is this different? We've been able to produce win32 executables using mingw and gcc for years now.Re:Xmingwin vs gcc-mingw32 (Score:3, Interesting)
for quite some time now.
(Link referenced by http://www.mingw.org/mingwfaq.shtml#faq-cross [mingw.org] )
Re:Xmingwin vs gcc-mingw32 (Score:4, Informative)
Re:Xmingwin vs gcc-mingw32 (Score:1)
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.
Not a bad idea for all teams (Score:3, Interesting)
Probably the largest win is allowing developers to unit test application logic on their local Windows desktop, if they prefer that environment, before doing final unit test, integration test, and deployment on top of *nix/Linux.
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:We've had this for years (Score:1)
We're using SDL, OpenGL, etc and it all works great with just a
MSDEV command-line under WINE? (Score:2)
Re:MSDEV command-line under WINE? (Score:2)
0) VC++ is non-free. (And not just by RMS's libre definition either. Legally acquiring it can take many $$$)
1) VC++ speaks a different dialect of C++ than gcc does. While neither of them is 100% standards compliant, you'd want the same set of workarounds to function for both target platforms.
2) You'd need some tricky scripting to propagate error conditions from VC++ through WINE and into make's status knowledge. Connecting it to a makefile, or an Ant build.xml, or whatever your buildchain is, would be more complicated than simply inserting a gcc cross-compiler.
Ahem (Score:2)
wat were they thinking (Score:1)
A real world example is needed. (Score:1)
As a particular minimal case try: Hello World app using wxWindows for both environments. It would be nice to see if this is a more vialble approach than using the same sources using gcc under Linux and Dev-C++ inder Win* to compile a portable app.
Just curious...
Sergio
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:A real world example is needed -- Voila! (Score:1)
This is the real thing in terms of what a practical developer of apps targeted to run both on Linux and Win32 needs.
Thanks!
Re:A real world example is needed. (Score:1)
now3d
Xmingwin vs. Visual-MinGW (Score:3, Interesting)
On the other hand, for those who want to use MinGW for Windows development, check out the GPL Visual-MinGW [sourceforge.net]. Al Stevens had some very nice things to say about it in the December 2002 issue of Dr. Dobb's. (The article isn't online, but the issue's table of contents is here [ddj.com].)
There are some significant licensing differences between MinGW and Cygwin. The Cygwin runtime is GPL (not LGPL!), but can be licensed for non-open use. The MinGW runtime is public domain.
Canadian Cross-Compiler? (Score:2)
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.
I've had success 2 years ago (Score:2)
A newer version of mingw as cross compiler (Score:1)
Having banged my head against a wall over this for a while, I eventually managed to put together a script (based on ideas from Pieter Thysebaert) that builds and installs mingw from latest sources (gcc-3.2.1, binutils-2.13.90,
The script also works around a couple of problems not described in any of the HOWTOs I've read.
Anyway, download it from here [gla.ac.uk]
Huh? (Score:1)
And, that's a big deal?
I've been generating cygwin releases from linux for
years. I can't believe that this rates as news in
any way.
If it does, then the crossgcc mailing list at sources.redhat.com is probably worth checking out. There you can be amazed by the fact that many many people are using cross compilers on a daily basis.