Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Windows Technology

Platform Independent C++ OS Library? 310

quench writes "Hello! I have been away from Windows and Linux application software for 5 years or so, doing mainly C-like embedded C++ programming. Now, I am about to start a project emulating embedded hardware on Windows. Been there, doing #ifdef WIN32 and #ifdef LINUX stuff, don't really want to go there any more. What I actually need is a platform independent lib covering Windows and Linux variants to handle sockets, IPC and threads abstractions. And a rock solid but simple embedded database to emulate flash memory. My reflex said, go for ACE and Berkeley-DB. Tell me, am I out of time? Am I missing something new and trendy, easier to use and better? Did time stand still?"
This discussion has been archived. No new comments can be posted.

Platform Independent C++ OS Library?

Comments Filter:
  • JAVA (Score:3, Insightful)

    by Anonymous Coward on Sunday October 11, 2009 @03:23PM (#29712573)

    This platform independent lib you are looking for is called JAVA.

  • Qt (Score:5, Insightful)

    by Anonymous Coward on Sunday October 11, 2009 @03:25PM (#29712587)

    Nokia QT rocks...

  • by Anonymous Coward on Sunday October 11, 2009 @03:52PM (#29712745)

    Use autoconf to handle platform idiosyncrasies.

    Ugh. Autoconf & automake are the most horrible things I've tried to use in recent times. These tools are far from simple and what works with newer versions of the tools isn't even compatible with older versions. The syntax is antiquated and there are multiple ways to achieve the same thing each with different pitfalls.

    Somewhere there is a meteorite set to strike autoconf. I hope it gets here soon since it's about 20 years late...

  • by tomhudson ( 43916 ) <barbara,hudson&barbara-hudson,com> on Sunday October 11, 2009 @04:14PM (#29712853) Journal

    #ifdef __BSD__

    BSD and linux are different in some aspects when it comes to sockets. Made it a real PITA to code on linux, runs perfectly, then won't compile on BSD without a few more includes and some extra code.

  • Just use POSIX (Score:2, Insightful)

    by Anonymous Coward on Sunday October 11, 2009 @04:33PM (#29712949)

    That handles all the things you mentioned, and you can compile pretty much all the same code natively on Linux or using Cygwin on Windows without having to bother with #ifdeffery at all.

  • by solid_liq ( 720160 ) on Sunday October 11, 2009 @05:07PM (#29713231) Journal
    Duh, Qt!
  • by taoboy ( 118003 ) on Sunday October 11, 2009 @06:50PM (#29713933)

    ...are ones with which I have the most experience. WxWidgets IMHO is the best 'close-to-the-metal' API, with the most available constructs to allow me to implement in C/C++ the Perl prototypes I develop. But most recently I've been noodling with Java to develop a high-availability platform, and I regularly run multiple jvms in Windows command shells to build stuff out, and then take the classes unchanged to a ttylinux-SunJRE-based cluster I run with VirtualBox.

    I'm not a Java advocate by any means, but you can't ignore the portability...

  • Re:Qt (Score:1, Insightful)

    by Anonymous Coward on Sunday October 11, 2009 @07:12PM (#29714097)

    Because, I mean, why would you go for a totally free and unencumbered platform that natively supports the language you want to use, when you could get a patent-heavy proprietary platform, controlled by a corporation with a history of making patent threats towards open source products, that only supports a proprietary and non-standard version of your language, and for which the open source implementation is immature and incomplete?

    Oh, wait, I think I answered my own question.

  • Re:JAVA (Score:3, Insightful)

    by Jeremy Visser ( 1205626 ) on Sunday October 11, 2009 @08:16PM (#29714381) Homepage

    One thing that appears to be a requirement is this must be a library for C++.

    There are C->Java converters.

    Let's play spot-the-difference!

  • by Thundersnatch ( 671481 ) on Sunday October 11, 2009 @11:32PM (#29715389) Journal

    It also does infuriating bugs. Programs that work fine with small amounts of data explode when you get them into production. Doom!

    And why, exactly, are your programs not exposed to realistic data sets until they are in production? I don't think you can blame wxWidgets for that massive failure.

8 Catfish = 1 Octo-puss

Working...