Try this patch and let me know if it works: https://sourceforge.net/p/codeblocks/tickets/374/#13f6
Try this patch and let me know if it works: https://sourceforge.net/p/codeblocks/tickets/374/#13f6
I will, assuming I can manage it.
Just for the record:
1. I did not press <Autodetect> in compiler settings.
2. Those two compilers are named like that (no "mingw32-" prefix) also in the old GCC v8 installations provided by mingw-64 project (e.g. i686-8.1.0-posix-sjlj-rt_v6-rev0).
3. The installation for "GNU GCC Compiler", which is also affected by this, points to C:\TDM-GCC-32, which is not an MSYS.
When you start Code::Blocks it runs a auto detect compiler routine!
Try this patch and let me know if it works: https://sourceforge.net/p/codeblocks/tickets/374/#13f6
Can you reproduce the problem reliably? Is any other setting getting lost?
We had some reports in the past that the default.conf file is truncated after a crash or some other unknown reason.
Could this be happening to you? Are you running multiple instances of C::B?
<msys2_mingw_w64_i686>
<NAME>
<str>
<![CDATA[msys2-mingw-w64-i686]]>
</str>
</NAME>
<PARENT>
<str>
<![CDATA[gcc]]>
</str>
</PARENT>
<MASTER_PATH>
<str>
<![CDATA[C:\msys64\mingw32]]>
</str>
</MASTER_PATH>
<DEBUGGER_CONFIG>
<str>
<![CDATA[gdb_debugger:msys2-mingw-w64-i686]]>
</str>
</DEBUGGER_CONFIG>
</msys2_mingw_w64_i686>
<C_COMPILER>
<str>
<![CDATA[agcc.exe]]>
</str>
</C_COMPILER>
But if no one else sees this, perhaps this is just some glitch on my setup, so you can safely label it a non-issue.Can you start from a clean state and try to reproduce the problem and post the exact steps?
Can you start from a clean state and try to reproduce the problem and post the exact steps?
What compiler(s) do you have installed and what directory are they installed in?Please read my previous post where I believe the issue is not with custom compiler configurations in C::B but with the base "GNU GCC Compiler".
Be aware the options_gcc.xml file looks for the mingw32 files as per the following options_gcc.xml file snippet below, so when creating a new compiler from this can cause issues when the default.conf is deleted as the executable will revert to mingw32 until the compiler settings are changed.This looks incorrect to me.
<CodeBlocks_compiler_options>
<if platform="windows">
<Program name="C" value="mingw32-gcc.exe"/>
<Program name="CPP" value="mingw32-g++.exe"/>
<Program name="LD" value="mingw32-g++.exe"/>
<Program name="DBGconfig" value="gdb_debugger:Default"/>
<Program name="LIB" value="ar.exe"/>
<Program name="WINDRES" value="windres.exe"/>
<Program name="MAKE" value="mingw32-make.exe"/>
</if>
<else>
<Program name="C" value="gcc"/>
<Program name="CPP" value="g++"/>
<Program name="LD" value="g++"/>
<Program name="DBGconfig" value="gdb_debugger:Default"/>
<Program name="LIB" value="ar"/>
<Program name="WINDRES" value=""/>
<Program name="MAKE" value="make"/>
</else>
Interestingly, in MSYS mingw64 packages with GCC the 32-bit one has only unprefixed executables while the 64-bit one has both unprefixed and prefixed with "x86_64-w64-mingw32-".
My MSys2 mingw32/bin has "i686-w64-mingw32-" prefix are you sure you looked at the full folder?Sorry, you are right I somehow managed to miss those files.
My MSys2 mingw32/bin has "i686-w64-mingw32-" prefix are you sure you looked at the full folder?Sorry, you are right I somehow managed to miss those files.
Although it seems that people moved away from MinGW to mingw-64, I have also downloaded the original MinGW package (with GCC 9.2). It has the unprefixed gcc and g++ executables and is the only package of all I tried having them also prefixed with "mingw32-".
The question remains: It seems that all relevant mingw distributions have gcc.exe and g++.exe so why use the prefix (be it correct or incorrect) for them?
I use the prefix because I have had the auto detect change the path without any warning!
Using the prefix I at least get an error with the bit type has switch!
I use the prefix because I have had the auto detect change the path without any warning!
Using the prefix I at least get an error with the bit type has switch!
If by "I use the prefix" means that you changed the C::B code then I find this to be not the best solution to the above problem:
1. Only MinGW uses "mingw32-" prefix and AFAICT, this distribution has been on its way out and has been superseded by mingw-64.
2. Changing the "base" GCC compiler settings affects (read "breaks") the custom compiler configurations derived from it.
But again, I know little about C::B so I am probably missing something here.
@PB have you checked the 20.03 branch if the file is the same there?