Search code examples
eclipsemingweclipse-cdt

Use nuwen.net's MinGW distro with Eclipse CDT


Eclipse CDT does not automatically recongize STL's (http://nuwen.net) MinGW distro. Whan can I do to let CDT find the paths for the toolchain automatically and not configure everything by myself?


Solution

  • According to https://wiki.eclipse.org/CDT/User/FAQ#I_installed_MinGW_toolchain_on_my_PC_but_Eclipse_won.27t_find_it. CDT will do the following to try and find a MinGW installation.

    1. Look at the mingw directory in the platform install directory. CDT distributions like Wascana may distribute MinGW like that.
    2. Try the directory above the install dir (another possible distribution).
    3. Look in PATH values. More specifically, it tries to find mingw32-gcc.exe in each path.
    4. Try looking if the mingw installer ran (registry.getLocalMachineValue("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MinGW", "InstallLocation"); ).
    5. Try the default MinGW install dir ("C:\MinGW\bin").

    STL's MinGW distro does not have a mingw32-gcc.exe and that’s the reason CDT does not recognize it.

    The solution is to take gcc.exe in the MinGW\bin folder (in my case C:\MinGW\bin), copy it and rename the new copy to mingw32-gcc.exe.