Slashdot Mirror


Compiling Under Wine

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."

17 of 322 comments (clear)

  1. Re:which begs the question by bstadil · · Score: 3, Informative
    Begging the question does not mean what you think it means.

    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.

    --
    Help fight continental drift.
  2. Re:Awesome by EvilSporkMan · · Score: 3, Informative

    Well, it won't be WINE, since WINE Is Not an Emulator, as we all know. =P

    --
    -insert a witty something-
  3. Re:which begs the question by fredrik70 · · Score: 5, Informative

    VC++ isn't a bad compiler at all, really. They got a quite shitty implementation of the STL lib though(might have changed now - I use VC++ 6). Also isn't properly following the C++ ANSI standard. for example the scope whenyou declare vars in for loops is broken. MS is aware but they can't really fix it easily now, since *lots* of old MFC code would break if they fix it. Yuo can set a flag though to enforce ANSI but it not on by default. Compiler makes quite good code though. If you want a more 'proper' closed source compiler go for Borland's - the command line version is even free on their website! (after a rather hefty registration proc though)

    --
    if (!signature) { throw std::runtime_error("No sig!"); }
  4. Re:No! No! No! by njchick · · Score: 3, Informative
    There are bugs in Windows that VMWare may not duplicate.
    Care to give an example? I think if you run Windows under VMWare, you get all Windows bugs plus maybe some bugs from VMWare.

    That's quite different from Winelib, which is indeed a separate implementation of Win32 that may "lack" some Windows bugs.

  5. Bullshit by 0x0d0a · · Score: 3, Informative

    Use the Intel compilers, your code will be 50-300% faster.

    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.

    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).

    1. Re:Bullshit by Ramadog · · Score: 2, Informative
      Furthermore, not all the optimization flags for gcc were being used (no idea why -fexpensive-optimizations wasn't used).

      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.

  6. Re:WRONG! by spinkham · · Score: 4, Informative

    He was testing on a seperate machine, just wanted to avoid the hassle of transfering all the sources every time he wanted to compile.
    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.

    --
    Blessed are the pessimists, for they have made backups.
  7. Re:1.0 ? by Papineau · · Score: 4, 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 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.

  8. Re:Awesome by Anonymous Coward · · Score: 2, Informative

    Speaking from experience, there was a definite Kiss-The-Ring culture surrounding OS/2.

    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.

  9. Or if your using Gecko by bogie · · Score: 3, Informative

    usercontent.css

    *[src*='ads.'],
    *[src*='/ad/'] ,
    *[src*='/ads/'],
    *[src*='/Ads/'],
    *[src*='dou bleclick'],
    *[src*='us.a1.yimg.com'],
    *[src*='ad vertis'],
    img[src^='http://images.slashdot.org/ba nner/'] {
    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"][wi dth="468"][height="60"] {
    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"][wi dth="728"][height="90"] {
    display: none !important;
    visibility: hidden !important;
    }

    --
    If you wanna get rich, you know that payback is a bitch
    1. Re:Or if your using Gecko by trezor · · Score: 2, Informative

      Or just a browser supporting CSS and user-css in genereal.

      No need for a gecko, when a Viking will do :)

      --
      Not Buzzword 2.0 compliant. Please speak english.
  10. Re:Awesome by rseuhs · · Score: 1, Informative
    So why hasn't Linux taken off yet?

    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.

  11. Re:1.0 ? by wolverine1999 · · Score: 2, Informative

    I managed to get Virtualdub to run but it did not work correctly. Hope they fix this. I hope they get some applications like Tmpgenc to work too.

  12. Re:1.0 ? by IamTheRealMike · · Score: 2, Informative
    I'm curious, what exactly will the "milestone" of version 1.0 of Wine actually mean ?

    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.

  13. Re:Windows Compliant / Posix Compliant Drivers by gregfortune · · Score: 2, Informative

    Doesn't Postgres have an ODBC driver? Any reason why you aren't using it?

  14. Re:which begs the question by awol · · Score: 2, Informative

    VC7 is just broken. Wait for the first service pack. We had to rearrange header files _and_ install the unreleased patch from MS just to get some code to compile (code that compiled find under, g++ (HP-UX, Linux, SunOS), aCC (HP-UX), CC (SunOS) and VC6).

    --
    "The first thing to do when you find yourself in a hole is stop digging."
  15. Re:WRONG! by bluGill · · Score: 2, 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.