Compiling Under Wine 341
now3djp writes "Interesting article over on CodingStyle that demonstrates how I successfully eliminated wasted time maintaining an MS-Windows computer when I could build natively from my GNU computer! /. has followed other cross compilers in the past. This article is different because I used MS's own compiler! This allowed me to get on with real games porting; with only a proportional increase in compile time. Wine has really come a long way in supporting simple apps, let us hope it reaches a 1.0 soon."
Awesome (Score:3, Insightful)
Re:Awesome (Score:3, Informative)
Re:Awesome (Score:5, Interesting)
Not exactly the same, but it would be much better to have native apps, as opposed to having to emulate/VM that other OS.
Re:Awesome (Score:5, Insightful)
I don't believe that this is actually true. Win95 had excellent Win3.x compatibility, but developers nevertheless rushed to develop Win95 software. Why would Win3.x compatibility in OS/2 cause developers to forego native development, but not have the same effect on Win95?
I believe that what really killed OS/2 was IBM's attitude toward developers. Microsoft made it trivial to get started in Win95 development. Hell, you could go into Egghead and buy an MSDN subscription and all the tools you needed.
Compare to OS/2, where you had to apply to IBM for permission to develop, and buy an expensive development kit (at least, to officially develop).
I believe it was Jerry Pournelle who wrote of his experiences at a trade show, where he went to the MS booth, and asked what he had to do to develop for the upcoming Win95, and they handed him, on the spot, a development kit. At the IBM booth, he asked what he had to do to develop for OS/2 (a system that was already for sale, unlike Win95, which was still in beta). Did they hand him a development kit? Nope. They handed an application. If they decided he was worthy, he'd be allowed to buy a development kit.
I think that is the reason OS/2 development never took off.
Note! I'm not saying for-pay developer programs necessarily kill a platform. Apple used to have a for-pay program, but it was a joy, because of the astounding support. You sent any question off to DTS, and they would quickly have a good engineer, with full access to the source and the developers, answer it. I was having trouble with interrupt handling in a device driver, and they send me the detailed comments from the ROM source code for the interrupt handler, which explained exactly what was going on.
With Apple DTS, the feeling I had as a developer was that I was dealing with my peers at Apple, who wanted to cooperate with me to make something great. With IBM, I always felt like an insignificant pawn in whatever they were doing.
Re:Awesome (Score:5, Interesting)
However, there were certainly compilers and development kits just anyone could buy and use (no application to fill out, just buy the box).
Exmamples: IBM's own excellent C-Set/2 (C/C++ compiler) (later Visual Age C++); Watcom's excellent C/C++ compiler; Borland's C++ for OS/2; Two (yes two!) distributions of gcc (gcc2 and emx). There were also two "Turboish" Pascal compilers and three "Visual" Rexx packages (somewhat Visual Basic like but using the Rexx language).
Still, I do agree that IBM could have been more friendly to developers, and IBM certainly did enough things wrong with the marketing.
Re:Awesome (Score:2, Informative)
Back then, most IBM stuff could not be purchased retail and had to be procured through the sales channel (who was only interested in you if you were buying mainframes). Meanwhile, Microsoft was spamming CDs like crazy, figuring they would get paid eventually.
Re:Awesome (Score:2, Interesting)
"3000 smackers please" was the only comment I got out of Cuppertino.
So I kept playing on the PC with my $49 copy of Turbo Pascal, and my ~$200 copy of Lattice C. When MS dropped their Windows SDK from $900 to $300 in '88, I bit and basically never looked back.
Re:Awesome (Score:5, Insightful)
Linux has far surpassed where OS/2 was, and is growing in use. Linux's total openness is a part of it's success (another part being it's freeness).
Linux has a large share of web servers. A large share of new super computer instellations. A large share new renderfarm instellations. A large share of scientific workstation instalations. A growing share in educational desktop installations. And a growing share in governmental type settings.
Linux is seriously taking off in a big way. It is HUGE and has far surpassed OS/2.
Re:Awesome (Score:3, Insightful)
You can roll and smoke that.
Re:Awesome (Score:2, Informative)
Stop the FUD.
Linux is already the most popular webserver, second most popular general purpose server, most popular cluster, most popular embedded system and soon most popular 3d-modelling desktop.
Re:Awesome (Score:3, Insightful)
Because good sized chunks of the development kit does not come with linux. Go browse the MSDN library CD, or browse it online. Check out the support for an object model that guarantees that any language the major compiler vendors put out, as well as a plethora of scripting languages, will be able to interface with it. I can script my mail app with everything from VB to python to C++. I am buried in more voluminous documentation than I will ever have time to read.
To say for a Linux dev environment "some assembly required" is to grievously understate the problem. The only thing a Linux environment has going for it in terms of documentation is a much bigger base of sample code.
It costs real money to put together a good development kit. But just ask Carmack why he prefers to develop on NT.
Re:Awesome (Score:3, Interesting)
Re:Awesome (Score:5, Insightful)
Nonsense, OS/2 was killed because PC-makers didn't want to use an OS from a competitor.
"Why port it when it can run the windoze version?"
Great, so you would rather have them ask "Why port it at all when 100% of our customers use Windows?"
Not exactly the same, but it would be much better to have native apps,
Sure, but we have to get a significant amount of users first, then can we expect native apps.
Wine helps building that userbase.
Instead of developers asking "Why port it when it can run the windoze version?" we have to have users asking "Why use Windows when Linux can run Windows and Linux apps?".
Re:Awesome (Score:2)
This is not insightful, that's nonsense.
Currently, there is no real need for native Linux games, simply because there are not many Linux gamers.
Wine is the ONLY realistic way to attract gamers (and create - not kill - the need for native apps).
Re:Awesome (Score:3, Interesting)
Otherwise their products wont run on old machines. There are still many win98 boxes out there.
And MS still offers IE6 for win98.
And the fact that their software runs fine in wine could aswell attract them to not use the newest apis in near future.
Yes but you actually need a windows copy. This might scare vendors from shipping desktop boxes with linux preinstalled.
"Oh sure, you can run Windows apps, just buy it for $300" -> WineX? They already have one and it works. (WineX has got a better one tho) Oh well, right now I'm down and uploading some stuff with eMule without any native dlls
And this "slowly" is a myth.
Right now it might be a lil bit slower due to not optimized implementations but after all - Wine Is not aN Emulator.
Re:Awesome (Score:3, Insightful)
Wrong. An API is by definition a fixed implementation that does not change at a later time. Of course there are additions, but those are not used until most of the userbase supports that extensions (which gives Wine a lot of time to incorporate those extensions).
Almost all Win32 software runs on Windows 98 (5 years old), most runs even on Windows95 (8 years).
b) vmware can run windows fine. it's not expensive, and it'll run most things better than wine ever will, if you want to actually get some work done (i used it for almost a year to do PCB design and circuit design using protel for uni, and this was on a celeron 366!)
Well, it *is* expensive. More expensive than Windows. And you still need Windows, too. And I did not even start to talk about the speed problems.
Also, it can't be incorporated with distributions, therefore distributions can't run Win32-apps "out of the box", but with a good Wine, they can.
c) killing games is stupid. you're just going to make linux less attractive to developers (who won't give too hoots that we need to bend over backwards to use wine, let alone attempt to get a proper port), and what with added cheat detection, wine will probably get marked as a "cheat" more and more often.
We have to build a userbase before expecting any native games. Without Wine, there will not be a gaming userbase, period. So Wine is the only way to make Linux a gaming platform.
Re:Awesome (Score:4, Insightful)
Try to tell that to the folks in Redmond. MS has done a great diservice to the idea of object re-use, they often fail to follow one of the most basic ideas of OO, that is you can extend but never change an interface. Almost every single service pack changes the interfaces to dozens and dozens of parts of the windows api. This is why we have "dll hell". If MS followed basic principals it wouldn't be a problem because rather than reworking the interface they would simply add new additions to the interface and depricate the old ones (leaving the origional interface and associated code so that programs would still get the behaviour they expect).
ads (Score:3, Funny)
--
lds
Re:ads (Score:2)
way to go, brain.
Re:ads - I dont see em :) (Score:3, Offtopic)
Or if your using Gecko (Score:4, Informative)
*[src*='ads.'],
*[src*='/ad/']
*[src*='/ads/'],
*[src*='/Ads/'],
*[src*='do
*[src*='us.a1.yimg.com'],
*[src*='a
img[src^='http://images.slashdot.org/b
display: none !important;
}
You can add whatever else you want there as well. Things like
/* this hides the usual 468x60 Flash banner ads */
embed[type="application/x-shockwave-flash"][w
display: none !important;
visibility: hidden !important;
}
/* this hides the not so usual but very annoying 728x90 Flash banner ads */
embed[type="application/x-shockwave-flash"][w
display: none !important;
visibility: hidden !important;
}
It is not recommended (Score:5, Funny)
Re:It is not recommended (Score:5, Funny)
that you compile under the influence of any type of alcahol
but it's ok to post on slashdot???
Re:It is not recommended (Score:5, Funny)
Don't drink and derive?
Even a man who's pure of heart (Score:5, Funny)
can turn to a troll
when the typos roll
and the bottle is empty and light
Re:It is not recommended (Score:4, Funny)
Re:It is not recommended (Score:3, Funny)
which begs the question (Score:2, Funny)
Re:which begs the question (Score:3, Informative)
It means :
"to assume something that hasn't been proven as a basis of one's argument,"
"Wine is not good because it is open source", or "Microsoft's compilers are bad because it is closed source", are examples of Begging the question.
Re:which begs the question (Score:5, Informative)
Re:which begs the question (Score:2, Insightful)
Don't like their STL? Use STLPort [stlport.org]! Bonus points if you can compile it under Windows using their incredibly sucky installation instructions [stlport.org], which sorta ... stop in the middle of the process.
Re:which begs the question (Score:2)
If you need total standards compliant though, Comeau C++ [comeaucomputing.com] is the tool for you.
Re:which begs the question (Score:2)
Actually I think you are wrong. I do not for one second doubt that your interpretation was the original meaning, but when almost everyone uses it to mean what the original poster did, then "begging the question" has taken a new meaning. It really DOES mean what the original poster used it to mean.
Besides, this new meaning is much more obvious than the old one.
Re:which begs the question (Score:2)
Except that we're thankfully not at that stage yet - this usage is common amongst North Americans (as are errors such as using "loose" when they mean "lose"), but is not widespread elsewhere.
Re:which begs the question (Score:2, Funny)
Big deal! (Score:2, Funny)
compiling? (Score:5, Insightful)
It's not so interesting to me that he managed to compile using VC++ under WINE. VC++ doesn't call any of the APIs you code, it just puts machine code into the file saying you can call them if you want. It's all well and good to have VC++ compile DX9_CreateSurface() (or whatever) into a bunch of PUSHs, POPs and a JMP instruction, but that doesn't help if WINE can't actually call that function when you're testing. It makes more sense to me to use Bochs or VMWare to test your application if you're developing on multiple platforms. Anything less would be short-changing your Windows clients.
Actually (Score:3, Insightful)
If I were really serious about a commercial cross platform release, say Windows and Linux I think I would want a ton of testing. I'd probably want at least 3 different systems, all tht had a copy of Windows 98, ME, 2k, and XP plus at least 3 big Linux distros. While in theory something complied for any hardware under any verison of Windows should work on any other, it's just not the case. Same for Linux. You want to test for the little "gotchas" if you want to make sure you have a really stable software.
GNU/translation (Score:2, Funny)
Re:GNU/translation (Score:2, Funny)
And better than some of mine too.
Funny thing is that I don't recall giving her a user account, so she's either stolen my password or rooted my box. And she looks so innocent sleeping over the sofa.
Guess my momma was right when she warned me felines were devious little fuzzballs.
(No, she's not named after the Friends character. She's named after Phoebe Snow. No, not the singer, the "train babe." Sheesh.)
KFG
Compiling under wine eh? (Score:3, Funny)
Re:Compiling under wine eh? (Score:3, Funny)
So now can i expect.. (Score:2)
WRONG! (Score:5, Insightful)
If the people are forced to test applications on slow machines, we may not have word processors that need 40MB of ram and a 933MHZ pentium III to run.
Re:WRONG! (Score:5, Informative)
Quote from article:
The transfer of source to an MS-Windows machine and the correction of filenames and text format issues have been avoided. Therefore, I can build the game from one machine, then I only have to copy the final chaos.exe to my MS-Windows machine to test.
Re:WRONG! (Score:5, Funny)
Re:WRONG! (Score:2)
Re:WRONG! (Score:2)
(But I could be wrong;-)
Re:WRONG! (Score:3, Informative)
It does not require a slow machine to find performance bottlenecks, it requires a fast machine! Anyone who wants to improve the preformance of code needs a profiler to find those places, but profilers slow down your code themselves, so you need a faster machine to get the same speed. In theory you can find the slow spots on a slow machine, but you are wasting a lot of time, a fast machine can find the slow areas in the code faster.
That isn't to say you never run on a slow machine, but if you determin it isn't fast enough on a slow machine you need the fast machine to find those slow areas.
If you try to improve performance without a profiler you waste your time optimising parts of code that are plenty fast, while often ignoring the part of code that is the problem.
One man I know optimised every line in his program that was too slow, and got a 1% speed improvement. After that he used a profiler and discovered his program was spending 60% of its time doing arctangents, which is done in the library and was optimised by smarter people than him. Excpet they assumed you would build a bridge with their function so they used newton's mythod to get about 15 decimal places of accuracy. His program didn't need that much acuracy, in fact the first thing it did after getting the arctangent was chop off everything after the decimal place. By implimenting his own arctanget he was about to get his program to spend 2% of the time doing arctangent, and the program ran twice as fast. However without a profiler he could never have discovered the problem.
Re:No! No! No! (Score:4, Informative)
That's quite different from Winelib, which is indeed a separate implementation of Win32 that may "lack" some Windows bugs.
Re:No! No! No! (Score:3, Funny)
Yes, but. The bugs taken individually won't show up. It's when they get together (and breed or something) that you get troubles.
Re:A double dumbass to you. (Score:2)
Re:So you're saying my vi clone. . . (Score:5, Funny)
Re:So you're saying my vi clone. . . (Score:2)
KFG
Re:So you're saying my vi clone. . . (Score:2)
Visual C++ under WINE (Score:5, Interesting)
Wine has really come a long way to facilitate running major applications such as Visual C++. Features that "just work" often do not get mentioned because there is nothing to say. Wine has many excellent features like this. However, I have expressed the problems with Wine currently and I expect that in a potential follow up article many of these will be resolved. Wine has been in development for over a decade now. As it is finally nearing a 1.0 release, I see how much better it was than the 1.0 release of MS Windows.
Using Visual C++ on GNU/Wine gives me all the benefits of being able to develop a 100% compatible MS-Windows version of the game, while saving me the time of maintaining another Win2k machine version of the source and moving to that machine to compile. It has been a great time saver for me and I strongly expect this information will be very useful to myself and others in the future.
Okay, so you can use Visual C++ compiler under WINE. Is that terribly surprising when WINE can run MS-Office for the most part? The compiler takes the source files and libraries and produces an executable or library. I don't know for sure, but I wouldn't think that too much of this would involve heavy usage of the Win32API, much less the lesser-used and less-tested-under-WINE parts. For the most part, the compiler would be doing tokenising, parsing, translation and optimisation, which would in all likelihood use no external libraries or anything.
I don't mean to rubbish this article, I'm just saying that I don't see it as being terribly surprising. On the other hand, I think this is a great use of WINE and is definitely more innovative that anythin I would use WINE for. And as he says in the article, there was a lot of fiddling around with command line arguments and environment variables. But if you're compiling from the command-line under Windows, it's just as bad (no, really).
A much greater "victory" for WINE would be to have the whole VisualStudio ensemble running. But I'm not sure if this is feasible, especially in the short-term. By "victory" I don't mean something along the lines of "Linux now allows you to run a quality IDE", because KDevelop and Eclipse are great IDEs. Instead, VisualStudio and Office are probably the most complicated pieces of software written by MS (excluding Windows itself) and for WINE to be able to run them both as if they were running under Windows would be truly a fantastic achievement.
Re:Visual C++ under WINE (Score:2)
Windows Compliant / Posix Compliant Drivers (Score:3, Interesting)
I'm a programmer for a Supplier of Software to the US Government and we are actively looking to port our products to Linux do to the strong interest from our clients. Specific Offices decide what products they want to implement and how to do it. We are investigating Emulating Windows as an one solution.
I look forward to the days when any program that is Windows Compliant runs on any platform that supports the Windows API.
That being said, the real problem I have is DRIVERS for my hardware working under Linux. If someone could emulate Windows enough to use standard Windows Drivers, there would be no more reason to use Windows at all. I truly commend those braves souls and companies who write drivers for Linux.
Now if there was a Proxy that accepted Microsoft SQL requests and sent them to a PostgreSQL backend transparently we would be free of the beast and save the Tax Payers lots of money paying my paycheck, plus blow our competiters out of the water. :o)
Re:Windows Compliant / Posix Compliant Drivers (Score:2, Funny)
Re:Windows Compliant / Posix Compliant Drivers (Score:2)
Re:Windows Compliant / Posix Compliant Drivers (Score:3, Informative)
GNU! (Score:3, Funny)
Or do you run Hurd? Which is technically the GNU OS.
The above is meant to be funny.
Re:GNU! (Score:2)
Re:GNU! (Score:2)
Or do you run Hurd? Which is technically the GNU OS.
He does mention Linux -- Mandrake specifically. But I agree, calling it GNU is a bit confusing (he also calls XFree86 "X-Windows", and refers to Unix-style text files as being in "GNU format").
As others have mentioned, running the command-line compiler isn't all that much of a feat. I was a bit disappointed that he "hand edited" all the #include directives to correct the case -- something that could be done with a Perl in-place edit...
Compiling under beer is better... (Score:2)
Try Maryland Wines [marylandwine.com], esp Bordy
and Beer [pubcrawler.com], esp Oliver Ale !
Re:Compiling under beer is better... (Score:2)
Hope this helps.
Off-topic, yes, but still informative.
GNU computer? (Score:3, Funny)
Re:GNU computer? (Score:2)
CVS (Score:5, Interesting)
Re:CVS (Score:2, Interesting)
I've been coding Java for a while now, but back in my C/C++ days, I only used the M$ command line tools. They integrate pretty well with a unix-style command line build system. The reverse isn't true.
Re:CVS (Score:2)
Using CVS as the main communication link between the two platforms means that linux developers can easily break the microsoft build, or vice versa.
I use Wine to compile but not for porting (Score:4, Insightful)
I know what your thinking, but when a piece of software has worked flawlessly (well almost!) for 15 or so years, and is 'mission critical' it is very hard to drop a platform and move on. I am hoping to try out a move to Linux some day in the near future so that I can take advantage of new features and things that just arent available for DOS. But unless I can convince everyone else of the benefits I may be supporting dos for quite some time (I am the only software person at this company).
1.0 ? (Score:5, Interesting)
I'm curious, what exactly will the "milestone" of version 1.0 of Wine actually mean ? I would doubt that it'll ever be 100% compatible with Windows 98/XP. So what feature list is the development team trying to complete before calling it 1.0 ?
I think that pretty much any other product would have been deemed a failure if it had endured a 10 year development life and not reached version 1.0. Unless of course we're talking about Duke Nukem Forever...
My experience of Wine is common to most people's I think; it looks like a great idea, but as soon as you try to run any non-trivial program, it simply locks up/doesn't work. I've looked at their website and looked at all the "passed" indicators on their test cases. That doesn't help me run my apps much though... do they need more test cases ? Are they simply too abstract ??
Just my $0.02 worth
Re:1.0 ? (Score:5, Informative)
Before 1.0, let it reach 0.9 (0.8 was released circa 1994 or 1995). You can check the unofficial Wine 0.9 TODO [www.dssd.ca] for a list of features needed for the 0.9 milestone.
About the long development life... don't forget it started with Windows 3.1 as it's first target. Then, Win95, Win NT 4.0, Win98, WinME, Win 2K, Win XP came out. We're talking 2 different architectures (for some kind of operations at least), and some new features to implement at each version.
Also, the list of authors currently lists 557 different people (contributions vary from a one-liner to a complete architecture overhaul). The number of currently active developpers is of course way smaller, more along the lines of 30-50. Of those, the vast majority do it in their spare time. So a long development period is not an indication of a failure, since if it was nobody would work on it anymore.
The test cases (called conformance tests) try to verify that what Wine implements reacts the same way in Windows. Depending on the purpose of a test, it can be trivial or not, implemented in Wine or not yet. A whole lot of dlls don't have any test written for them yet, so yes, we need more test cases.
Re:1.0 ? (Score:3, Informative)
It's mostly purely technical targets, for instance the wineserver protocol will be frozen, which means that (I think) you can build WineLib apps and upgrade Wine and they won't break. There are a few other targets, mostly esotoric.
Wine 0.9 is far more interesting, and will hopefully come out in the last part of 2003. It's focussed on being easy to use and setup.
A lot of problems people have with Wine are usually related to it being badly setup. Partly that's our fault, Wine isn't especially easy to setup right, and because it releases every month, distro packages are often out of date (and now redhat doesn't even ship it anymore). After being increasingly frustrated with Wine, I tried CrossOver (a slightly hacked up version of wine designed to be easy to use), and it worked so well I was blown away. Installing IE6 in Wine is a distinctly wierd experience :)
Anyway, I've been using WineHQ wine for quite some time now, but hopefully along with proper setups (DON'T use your pre-existing windows installation etc) Wine will get a much better reputation.
This is non-news. (Score:5, Insightful)
I don't even need to look at the poster to know that this is the work of micheal...
Cygwin still doesn't work (Score:5, Interesting)
Another interesting observation - putty doesn't work (the preferences are not displayed), but Internet Explorer works.
I would except it to be easier to make Wine support applications that have the source available, but the experiment shows that the closed source software works better under Wine. Apparently, there is much more interest in running commercial software, yet it's surprizing to see free software so badly supported.
Re:Cygwin still doesn't work (Score:5, Informative)
The putty problem you describe is actually a regression (was working, a patch broke it lately, the problem is known, but I don't know when it'll be fixed). BTW, putty can now be compiled out-of-the-box with Winelib, resulting in a native Unix application.
The reason IE, Office and MS's compiler are more tested is that there's no 100% equivalent in OSS, so people have an interest in making them work under Wine. Putty is a ssh/telnet application, of which several others exist for Unix. Cygwin doesn't really serve a good purpose running under Wine, because it's main goal is to help in the porting of Unix apps to Windows, except that it really is a good test for Wine internals (headers, threads, files, pipes, etc.).
That being said, don't forget that OSS (or source available) programs for Windows still use the Win32 API, which is an enormous beast, and for which some parts are not documented anymore (even if still in use). And there lies the bulk of the current incompatibilities with Windows software, not in the source code of a particular program. The other part is mapping Win32 APIs/concepts to the equivalent Unix lib or concept.
Re:Cygwin still doesn't work (Score:2, Funny)
run Native WinXP (with remote desktop) ->
VMWare (Linux) ->
Wine ->
Cygwin (with xserver) ->
VMWare (WinXP) ->
remote desktop back to the beginning
All on the same computer?
Oh Boy! It's what I've always wanted! Thanks, dad!
Re:Cygwin still doesn't work (Score:2)
Re:Cygwin still doesn't work (Score:2, Interesting)
Then again, putting emulators inside each other is a good way to see if they really really work. Kind of like running text back and forth through babelfish...
An unbiased assesment (Score:5, Funny)
He thinks it's interesting. Imagine that - he wrote the damn article. Of COURSE he thinks it interesting.
Re:An unbiased assesment (Score:2)
Not always. I've written plenty of things myself that I find insipid, pointless, or boring.
This post, for instance.
This sounds really lame. (Score:2, Interesting)
GNU/WINE?!?! (Score:3, Insightful)
Repeat after me, "WINE is not a GNU project!"
I do this with a DSP compiler (Score:3, Interesting)
Running the command line tools under wine works fine, and now I am able to have one intel linux box compile all the DSP and PPC firmware as well as the Linux GUI code in a cron job from the daily cvs snapshots.
Doing this has made things SO much nicer. I would prefer if TI had a linux version of their DSP compiler, and will continue to pester them for one, but in the meantime WINE saves the day and allows me to NOT run windows for weeks on end!
My Win2000 anti-uptime is around 3 weeks now. I am weaning myself off windows!
Running command line tools like compilers is one of the EASIEST things for WINE to do - All they have to do is read and write files and allocate memory.
Biggest hassle for me: having to make special sed scripts to deal with mixed case file names in the auto-generated makefile dependency list that are incorrect since the compiler assumes case insensitive filesystems.
--jeff++
weird... (Score:5, Funny)
It's MAGIC.
heh... wine... (Score:3, Funny)
*hic*
Re:such a deal (Score:3, Funny)
Too bad it'll never happen. I'm sure if such a project began within MS, Bill (or some exec) would scream "Heresy!". Remember, a win for GNU = a loss for MS in most cirsumstances.
Providing, of course, it didn't totally suck!
MS Sales Rep: "Well Sir, "doesn't suck" wasn't listed as one of your product requirements... Sorry, no refunds!"
Bullshit (Score:4, Informative)
50-300%? You're nuts. I've used both, and performance definitely varies...and if I had to choose one or the other as "generally producing faster code", I'd probably point at gcc.
Take a look at these benchmarks [randombit.net].
Gcc produces fastest code on 26 of the tests, icc on 9.
Furthermore, not all the optimization flags for gcc were being used (no idea why -fexpensive-optimizations wasn't used).
Re:Bullshit (Score:2, Informative)
With gcc when using -O2 and up -fexpensive-optimzations is automatically turned on
Try using gcc -v -Q -O2 a.c to see what options are turned on. The file a.c has to exist.
Re:Bullshit (Score:2)
if (a < 2)
{
if (a < 3) foo
else bar;
}
baz;
}
Re:Bullshit (Score:5, Interesting)
For example, we ran several benchmarks at work on three computers with gcc 3.1 and the intel compilers. Basically gcc and intel were fairly equal on the pIII xeons (intel had the edge). Gcc was somewhat faster on the athlon 700, and the intel compilers blew gcc away on our p4 2.4 ghz.
So what conclusions can you make? neither intel or gcc are better than the other. As we expected it depends on several factors - one of the main is hardware (wow, who woulda thunk hardware affects optimization
If I had to choose one or the other as "generally producing faster code" I would ask "what hardware are we talking about". And that GREATLY influences the answer.
Re:Bullshit (Score:2, Interesting)
Should the gcc people optimize well for the p4 (and they will) then I will say the bet goes back with them. Of course this is assuming that the only thing to worry about is speed of generated code (which in many cases is not the most important).
Safe performance (Score:3, Insightful)
That said, another option is to isolate the performance-critical sections into chunks of code which get optimized separately and then have cpu-detection code choose the appropriate chunk at runtime. The debian atlas packages [debian.org] do something like this, though (AFAIR) they use hand-optimized assembly instead of just using compiler flags and/or different compilers. (and yes, you can have both the sse- and 3dnow-optimized packages installed on the same machine, and the code will load the appropriate shared library at runtime)
Then, instead of standardizing on a compiler, you'll need to standardize on a build system that will let you compile the code as you need it compiled.
Re:License Violation? (Score:3, Interesting)
Oh please. Yeah, let's all cower in fear of Microsoft. Let's stop what we're doing because Microsoft might not like it. Let's always worry about being sued.
It might be a very real possibility, but it's one you should never worry about, just be aware of. It's as bad as terrorism, it only works if the target becomes terrified.
Re:I hope you PAID for the VC++ compiler (Score:3, Interesting)
I have only one computer that runs windows NT so only one of these operating systems is in use.
I have red hat linux 6.1 server edition, OpenBSD 3.0 and Mandrake 8.1. I paid for all these too even though they are free.
Now, my desktop runs Debian and it is just great and I did a net install. Guess what, I don't know how to upgrade that RH 6.1 machine. Sure I can reformat the hard drive - but it contains a LOT of my work and I don't want to lose it. With Debian, an upgrade is easy.
In addition to this I bought 2 copies of Brief and I can't use it even though it is my favorite editor. I did a trial d/l of CRiSP and it is a wonderful editor, fully Brief compatible. I contacted them about licencing. I run 8 machines in my home and am a member of the local Unix users group and do consulting work. The CRiSP people told me I would need a "Licence Manager"! I decided to learn Emacs. It has a CRiSP mode and is looking better every day.
I bought 3 versions of M$ FTN and copies of M$ C as well. The last version of M$ FTN was such a botch that I could not use it. I have the Borland OS/2 C/C++ compiler. It was so broken I didn't use it.... but I paid for it. I have Borland C++ professional builder 4. I want to do C/C++ cross platform development.
I phoned Borland. I think they told me that I can buy Delphi for Linux. I think they told me that the language is supported on both platforms but that the API is different. The person on the other end of the phone didn't seem too knowledgable. So I am going into wxWIndows or gtk because these people actually SAY they are cross platform. Thus, I do not have any C++ builder code and didn't get my money's worth.
I have 4 versions of Oracle - paid for by the taxpayer (because I am one of their developers). The DOS versions were so bad we couldn't use them on that platform. The OS/2 versions were better but still not good enouf. It is not possible to install 8i for red hat 6.1 (even though that is the version oracle says 8I is for) unless you CAN STAND ON YOUR HEAD and read the paper What you need to knwo before you even THINK of installing oracle 8i . Imagine having to backdate the glibC and install an old version of Java from blackstrap just so you can get the installer to work. Why couldn't Oracle have put their developers into a room with 2 cd sets. One set - an off the shelf shrink wrapped copy of Red Hat 6.1, and the other set - a copy of the 8i source tree. And then make sure they don't have INTERNET access so they can't cheat and create a version that you can't install. Leave them there until they solve the problem or rot to death trying!!! Damit. I have lost MONTHS of my life solving other people's problems.
Guess what, I am porting the client's apps over to PostgreSQL. See ya Oracle!!! Goodbye!
So, of all the software I bought most of it did the job for a precious short time or didn't do the job at all - with the exception of Brief - which was just excellent. And what happened to Brief? Borland bought the rights, put it on the shelf and AFAIK I can't buy it any more.
So frankly I really don't care if that copy of VB ++ was paid for. Even if it wasn't, I do not feel M$ was ripped off . I feel I was ripped off.
I have been ripped off Over and Over and Over because I bought these products in good faith and paid for them with my hard earned money. Now I can't use them. Some never did what they were advertised to do. Others were discontinued and I lost out.
Let me tell you about the 2nd last copy of M$ FTN that I purchased. I found a bug where the conpiler just eliminated an "IF" statement. No errors, no warnings, and no machine instructions either. I filed a bug report with M$ with sample code. Months went by. I re-filed the bug. Months went by. Finally I phoned them and sat on wait for like an hour - and paid for this too. The rep told me the bug was fixed in the new version. So I bought it.
When the new version arrived I tried out the sample code from the bug report. The problem was still there. Oh, and the last version I bought couldn't be used it was so bad. The client dropped PC development ideas and switched to SUN.
What the Open Source movment has done is a refreshing breath of fresh air and IMHO it is the ONLY way that the programmers of the future are going to stand any chance of avoiding the endentured servant trap that closed source software creates. Anyone questioning this should realise that in order to use closed source software they have to agree to the licence terms and these are arbitrary and non-negotiable. If you find the terms unacceptable then you can't be a programmer. That is unless you can find the tools and the infrastructure you need elsewhere.
Well, we programmers are being attacked another way now.... patent law. If this gets too well established we won't be allowed to be independant. We'll have to work for a big company that has managed to negotiate cross licensing. Either that or pay the piper each time we want to go to the can.
Water flows down hill and the infrasructure required to build some of the closed source tools, like Windows NT/2K/XP, or Oracle or JAVA or say a compiler suite like Visual C++ or Borland Professional Builder is so great that it looks like an ocean. Oceans are hard to move. Oceans are also hard to re-create. There is no way that any company could recreate from scratch an operating system like XP. The environment that XP grew out of no longer exists. IBM tried and failed.
Over the years all computer companies with the exception of perhaps IBM,HP,M$ have failed. Who here thinks Microsoft will survive into the year 2050? Gates won't be in charge then. Who here thinks that another company is going to loom up that can invest the BILLIONS in infrastructure required to create an alternative?
The future of software has to be opensource because that is the only way for us programmers to ensure that we will have the tools we need and the right to use them.
If I add up the THOUSANDS I have spent on software over the years it illustrates to me that I should have been looking for better solutions a long time ago.
Re:moving source? (Score:2)
Cygwin [cywin.com] is great for this and even allows you to run your own makes and build scripts from Linux. The GPL restrictions only apply if you link to GPL code, which you won't if you are running Visual C.
You lose the IDE though, but generally you just want to spend most of your time developing on one platform and just checking that you can compile on the second, leaving the debugging on that platform until later.
Re:wow (Score:5, Interesting)
Now this is impressive. Things like this are what WINE should be all about. Amazing.
I disagree, it's depressing not impressive:
In summary, while the article probably accurately describes the author's actions, there is nothing in his account that others should be emulating. More experienced developers should be consulted in the search for best practices.
I write this as someone who has done software development for almost 20 years; more than 20 if you count my high school years as a computer hobbiest.
You are ignorant. (Score:3, Insightful)
The author first asserts that the process of moving files between the systems causes the upper/lower caseness of the filenames to be munged
This is the case, I've run into this problem myself many times and it has little to do with how the files are saved and much to do with how fs-drivers are implemented and configured. Compare to how you often end up with read-only files if you copy them from a CD in Linux. Sure you can change some settings, but then often get other side-effects in other situations (goes for both). I believe he is the original author of his project.
The author displays no knowledge of the network mounting of filesystems using SAMBA (CIFS) or NFS.
The fact that he is dual-booting strongly suggests that he (like most of us) only has one development machine, not a complete network of machines. Don't get ignorant just because you are better equipped.
Why isn't the source code checked into a configuration management tool, like CVS?
Once again, he only has one workstation, thus is CVS out of the question since it needs to be hosted under one of the OSes and he can only run one at once. Besides, CVS is in most cases just unnecessary and complicates and slows stuff down if you are the single developer. You can make backups through normal file copying.
As others have already noted elsewhere, he will still have to test on the target platform.
Which I'm sure he does now and then too (by dual booting). However, if you just need to do some minor change in platform independent code it's really a bliss to not need to dual-boot.
Besides, your criticism of using VMWare for testing is quite irrelevant. It's true you need to test on multiple environments to know that it works on them all, but as you said, VMWare with Windows X *IS* one of these environments. If he's dual booting he only has access to one environment anyway, using VMWare as well will add one or more extra testing environments.
I would have LOVED to have a similar setup as his when I was developing BladeEnc. Like him I only had one development machine (couldn't afford more) and constantly needed to dual-boot in order to recompile and package a new version. The platform dependent parts of BladeEnc were very limited and untouched for 95% of the development, thus this setup + testing under wine (for possible quality degradation due to compiler excentricities) would have been more than enough during most of my days. Only performance tweaking would have to be done in windows environment.
With your 20+ years as software developer you obviously have found your way of working in your projects and with your budget. Don't knock others creative solutions for solving their problems with their resources in a totally different situation.