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?"
JAVA (Score:3, Insightful)
This platform independent lib you are looking for is called JAVA.
Qt (Score:5, Insightful)
Nokia QT rocks...
Re:As someone working on a massive project... (Score:3, Insightful)
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...
Yu left out one #ifdef (Score:3, Insightful)
#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)
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.
Heh, ACE is for old foggies (Score:2, Insightful)
Java, Perl, and WxWidgets... (Score:3, Insightful)
...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)
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)
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!
Re:wxWidgets might work (Score:3, Insightful)
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.