Best practices for a C++ portable opensource application
The most important thing for your project to catch up is portability. It should be easy to build & run for everybody.
GCC (g++) is indeed the compiler of choice. It comes from the opensource world and is therefore most widely adopted by it.
However, a simple Makefile won't cut it. Generating it using CodeBlocks or any other IDE has a problem: Due to their platform, other developers will probably have to generate their own, but won't necessarily have CodeBlocks at hand, or just don't want to use it.
There exist several different cross-platform build systems, which are IDE-agnostic. Some of them create Makefiles, others don't use make but build on their own.
- The most widely adopted build system is Autotools. However, it is hard to learn, cluttered, and an overall pain in the ass.
- Out of many other choices, I recommend Waf. It is proven by several larger open source projects already, XMMS2 being a good example (while not a very popular project, it has a large build with a lot of plugins and builds on a lot of platforms including OS X and Windows). While waf is not very broadly adopted, it is meant to be shipped with the source and easy to set-up. My recommendation for you.
Edit: to get started with your Open Source project, I also recommending this book by Karl Fogel (available for reading online). Have fun!
The GNU C++ compiler is a relatively good choice for crossplatform work, except that on Windows only a relatively old version (3.4) is natively supported. Work is underway to port a 4.x-series to Windows, but so far it's not ready for prime time.
Rather than focus on what compiler to use, I'd instead focus on which language to use. Writing ANSI standard C++ will go a long way towards making your code crossplatform. As far as possible, hide platform-specific behavior behind a good toolkit, such as Qt.
For cross-platform build environments, this may depend on what toolkit you use. Qt has QMake, which is relatively good. CMake is another compelling choice. I would avoid Autotools, since it has very poor portability outside of UNIX -- using Autotools on Win32 is very often the torment of the damned.
Finally, start working on multiple platforms now. VMware is invaluable for something like this. Get your code to compile on Linux, on FreeBSD and on Windows. If you can hit those three targets, moving to other platforms will be enormously easier in the future.
Depending on the specific platforms, Qt may hold the answers. Especially with the new license.