Search code examples
msys2

MSYS2, change the gcc toolchain PATH to "C:\TDM-GCC-32" instead of using the default MinGW-w64 one?


To use MSYS2 shell, how to change the gcc toolchain PATH to "C:\TDM-GCC-32" instead of using the default MinGW-w64 one ?

How to tell MSYS2 to use "C:\TDM-GCC-32" toolchain instead of the default ?

Thank you for your understanding.


Solution

  • You can add that toolchain to your path by running this command in an MSYS2 Bash shell:

    export PATH=/c/TDM-GCC-32/bin:$PATH
    

    I'm assuming the TDM-GCC-32 folder has a "bin" folder inside it with executables. If that's not the case, you will need to edit the command above.

    Note that, in general, adding a folder to your PATH with arbitrary executables and DLLs could cause problems with MSYS2, because those executables and DLLs might be used instead of their default counterparts with the same name.

    Also note that the binaries generated by TDM-GCC might not necessarily be compatible with the binaries generated by MSYS2's MinGW toolchain.