But i guess it doesn't matter that much, because Visual Studio compiler settings are 100% incompatible to GCC
It's because each compiler has their own compiler flags. But if you compile "normal" way each compiler simply produces a working object/executable file from a C++ source code file. Compiler settings don't matter in that, they mostly help catch errors, optimize code etc.
Contrary to what some people believe, Visual C++ is these days pretty ok compiler and it supports most of C++ standards, just like GCC. If you keep it simple and don't do any super magic stuff it's going to compile in both GCC and VC just fine. I'm doing exactly that, I have set up my projects to work 1:1 in both compilers and IDEs, because some built-in compiler flags in GCC are nice, they catch more stuff than VC, but Visual Studio's static analyzer tool is also quite nice.
C++ itself is not a big problem when porting, it's mostly older C functions, but even they have a quite solid standard implementation. The two actual problems are external libraries and setting up the project for both Code::Blocks and Visual Studio (or worse: linux vs. Windows). I think you just have to keep track of two projects, what files are in the project etc. but it's not that hard if the project is moderate size. Porting from linux to Windows is actually harder than the other way around, this is something linux fanboys tend to forget. It's mostly libraries, many linux projects use shady, weird libraries which aren't available for Windows in the first place so you run out of luck really fast.