Windows,
Unix,
Macintosh
Bit versions:
32 bit and 64 bit.
Background:
I have been programming in various languages since the days of card-punch. But, for stand-alone executables, only within the past few years I have (mostly) stopped programming in all of those languages and I am now using (attempting to use) only C++11.
Language choice logic:
I chose C++11 because it is the most currently useful for consumer software applications, game engine applications and development, and industrial applications. I am trying to stay away from Independent Development Environments (IDEs) because, in my experience, they do corrupt C++11.
For that I have chosen a free and open source compiler:
CODE::BLOCKS 17.12 (exactly that version) without wxWidgets.
I studied various other compilers and this was my choice for the previous constraints.
Some background for this choice:
I am programming in C++11 with backward compatibility considerations and for cross platform considerations. I am using CODE::BLOCKS 17.12 so that later I can use the same code on Windows, or Unix, or Macintosh. I am using CODE::BLOCKS 17.12 so that later I can compile the same code in either 32 bit or separately and independently compile it in 64 bit.
For Microsoft Windows users:
CODE::BLOCKS 17.12 on Microsoft Windows XP Professional/Service Pack 2 (not sp3).
In general, compiling with on later versions of Microsoft operating systems have been rejected for the previous backward compatibility constraints and cross platform constraints, etc. That even applies to virtual operating system conditions.
Thus, XP Pro ((32 bit with sp2) or (64 bit with sp1)) has been chosen as the most universally useful platform for programming within these constraints.
I set the compiler options to the following:
GNU GCC Compiler
C Compiler:
mingw32-gcc.exeC++ compiler
mingw32-g++.exe
with these Compiler Flags:
General
Have G++ follow the C++11 ISO C++ language standard [-std=c++11]Warnings
Static linking [-static]
Target x86 (32bit) [-m32]
Enable all common compiler warnings (overrides many other settings) [-Wall]Optimization
Enable Effective-C++ warnings (thanks Scott Meyers) [-Weffc++]
Warn about unitialized variables which are initialized with themselves [-Winit-self]
Warn if '0' is used as a null pointer constant [-Wzero-as-null-pointer-constant]
Warn if a class has virtual functions but no virtual destructor [-Wnon-virtual-dtor]
Warn if a function can not be inlined and it was declared as inline [-Winline]
Warn if a global function is defined without a previous declaration [-Wmissing-declarations]
Warn if a user supplied include directory does not exist [-Wmissing-include-dirs]
Warn if an undefined identifier is evaluated in an '#if' directive [-Wundef]
Warn if anything is declared more than once in the same scope [-Wredundant-decls]
Warn if floating point values are used in equality comparisons [-Wfloat-equal]
Warn if main() is not conformant [-Wmain]
Warn if the compiler detects that code will never be executed [-Wunreachable-code]
Warn whenever a local variable shadows another local variable, parameter or glogal variable or whenever a built-in function is shadowed [-Wshadow]
Warn whenever a pointer is cast such that the required alignment of the target is increased [-Wcast-align]
Warn whenever a switch statement does not have a default case [-Wswitch-default]
Warn whenever a switch statement has an index of enumerated type and lacks a case for one or more of the named codes of that enumeration [-Wswitch-enum]
Don't keep the frame pointer in a register for functions that don't need one [-fomit-frame-pointer]
Optimize general code (for size) [-Os]
Strip all symbols from binary (minimizes size) [-s]
To stay within these constraints (when programming):
I have stopped using wxWidgets.
I have stopped using ".NET".
I have stopped using Visual Studio.
I try to follow rules and guidelines and suggestions that I have found within writings by Stroustrup.
If you chose to follow this process, you may use this article as a reference and link to it. If you are on other sites, and link to here for this, please state that you found this on bytes.com
.