Slashdot Mirror


Migrate Win32 C/C++ Applications to Linux

An anonymous reader writes "This series of articles helps you migrate your Win32 C/C++ applications to Linux on POWER. Win32 C/C++ Apps to Linux Part-1 of this series covers the Win32 APIs mapping to Linux on POWER regarding the initialization and termination, process, thread, and shared memory services. Win32 C/C++ Apps to Linux Part-2 illustrates how to map Win32 to Linux with respect to mutex application program interfaces (APIs)."

7 of 393 comments (clear)

  1. The problem with migration is... by Jaidon · · Score: 5, Funny

    ...that sometimes during the process the stragglers fall prey to hunters.

  2. Re:Stupid question by laughingcoyote · · Score: 5, Funny

    Nope. It relates to porting Mac applications to run under Solaris. They just called it "Win32C/C++ Applications to Linux" to see if you'd ask a stupid question.

    Worked brilliantly, too!

    --
    To fight the war on terror, stop being afraid.
  3. Re:"windows" by Greyfox · · Score: 4, Funny
    The hardest part of porting to Linux will be figuring out what all those hungarian notation variables were supposed to be. pszStringVar3? WTF?! Hungarian notation is always a warning sign that deeper evil lurks within the code disguised by programmers pretending that they know what they're doing because they can adhere to a naming convetion for warts while choosing actual variable names that make absolutely no sense. If you notice that hungarian notation is in use, it's going to mean that the project is going to end badly. Insure that programmers who insist in using it are removed or assigned to little projects that will probably never be used so they don't end up dragging everyone else down with them.

    You'd think I was overgeneralizing, but I'm not. Absolutely every single time I see HN in use, I quickly end up learning that the programmer who wrote the code was an idiot. On at least two separate occasions, I've had to correct C code with HN that did not allocate space for the null terminator on any strings anywhere in the code. That's pretty much the level of programming talent you can expect when you see HN in use.

    Conversely, I have never seen any code using HN which I looked at and thought to myself "Well that's a sweet way to solve that problem!" Not even once have I ever seen an elegant algorithm expressed in code written with HN. Not one single time.

    Now I could propose several different reasons why I think this might be the case. It could be that HN actually causes brain damage in otherwise able individuals. It could be that it is a harbinger of doom, like some programmatic horseman of the apocalypse. More likely the programmers in question went through some community college somewhere and HN was the only thing they can remember from their beer-and-drug soaked college days. They've advertised that they know how to program and probably claim to have invented C, and they point to their strict adherence to programming convention, missing the fact that conventions without understanding is still stupidity. And it's not like managers typically know any better.

    Which is why every trace of HN must be eradicated from any code which is ported, before it is allowed near our pristine and pure operating system. Well that, and the code will be more maintainable in the long run.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  4. The best way to handle Win32 by Anonymous Coward · · Score: 4, Funny
    #ifdef WIN32
    # error "Get a real operating system."
    #endif
  5. Re:binary semaphore and mutex is not the same !!!! by IamTheRealMike · · Score: 3, Funny
    Ask and ye shall receive.

    Or what, did you really think we could run apps like Office and iTunes without such a basic sync primitive?

  6. Re:Portable code by JWhitlock · · Score: 3, Funny
    I can't write code myself, so obviously there is a lot that i dont know. But is it really that hard to write code that is portable?

    I'm not a polygamist, so obviously there is a lot that I don't know, but I imagine it's about as hard as dating two people at once. Once it goes into production, it's more like being married to two people. Not impossible, but surely you can imagine some of the difficulties. Unless you haven't dated, in which case you should have plenty of time to pick up programming.

  7. How to migrate a Windows app: by pclminion · · Score: 2, Funny
    It's easy, really:

    $ cp /mnt/samba/xyzzy/programs/windows_app.exe .
    $ objcopy -O elf32-i386 windows_app.exe windows_app
    $ ./windows_app

    ;-)