I am trying to use CodeBlocks (version 20.03 from 14th March 2020) with newer Microsoft Visual C/C++ compiler, and encountered several problems:
1. Under Settings->Compiler, I have created new compiler "Microsoft Visual C++ 2019" and set it as default compiler. I couldn't set 'Compiler installation directory', because C::B assumes all executables must be in 'bin' subdirectory of this path. This assumption is incorrect with newer MSVC compilers (for many years already, IIRC). Instead, I had to leave 'Compiler installation directory' empty, and add directories where required binaries are located to 'Additional paths'. Building with this compiler now works correctly.
My problem is that when starting CodeBlocks, I always get the "Compiler auto-detection" dialog, where it says that the default compiler "Microsoft Visual C++ 2019" is "not found". It says that "at least one compiler master path is empty and therefor invalid". Looks like the "Compiler auto-detection" dialog only considers "Compiler installation directory" and not "Addtitional paths"?
2. With every build using this compiler, I keep getting "Enviromental error" message "Can't find compiler executable in your seach path's for GNU GCC compiler". But I am not using GCC at all (my project does have targets for GCC compiler, but I am not building those).
So, how do I correctly set up newer MSVC in CodeBlocks? Can it be done without workarounds (like installing GCC just to shut up an invalid warning, or creating fake compiler directory with 'bin' subdirectories)?