I have used Eclipse CDT with msys2 and was able to mark it work correctly. The steps below are for the mingw64 toolchain, settings for an msys2 toolchain are a bit different. Also, I'm using Eclipse Luna (4.4) with latest CDT version.
Here the rough steps I performed from memory (some could be missing, some could be extra, hope they help you):
I added to my PATH the folders C:\Gnu\mingw64 and C:\Gnu\usr\bin because if I remember correctly, CDT was complaining that gcc command was not found. This is from I read, not recommended by everyone, not sure why thought.
In Eclipse CDT preferences (Windows > Preferences > C/C++ > Build > Environment), set a variable MINGW_HOME to /mingw64 mount point location (in my case, path is C:\Gnu\mingw64).
Restart Eclipse. Normally, that should be enough. When starting Eclipse, CDT should discover the mingw64 toolchain.
If that does not work out of the box, there is two places to play with some settings:
Windows > Preferences > C/C++ > Build > Settings (Discovery Tab)
You can try to clear entries and reset buttons on the CDT GCC Built-in Compile Settings MinGW.
Project Properties > C/C++ General > Preprocessor Include Paths, Macros, Etc.
I providers tab, you can try to disable all providers except CDT GCC Built-in Compile Settings MinGW, CDT User Settings Entries and CDT Manager Build Setting Entries
After each try, rebuild CDT index by right-clicking on project and then select Index > Rebuild.
If it works, it should look something like this (with some differences due to settings of my own project):
Hope this helps
Regards,
Matt
P.S. Tickets are for bugs and feature requests. For support, please use the mailing list instead: https://sourceforge.net/p/msys2/mailman/msys2-users/. By using the mailing list, you will probably also reach more people as I'm pretty sure not all people monitoring the mailing list also monitors the ticketing system
Setting MINGW_HOME to c:\msys64 worked for me. Additionally, I appended the PATH variable to c:\mys64\usr\bin which provided the msys2 binaries setup instead of the mingw64 setup. It wasn't necessary to restart eclipse v4.4.2.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Mathias,
I have used Eclipse CDT with msys2 and was able to mark it work correctly. The steps below are for the mingw64 toolchain, settings for an msys2 toolchain are a bit different. Also, I'm using Eclipse Luna (4.4) with latest CDT version.
Here the rough steps I performed from memory (some could be missing, some could be extra, hope they help you):
C:\Gnu\mingw64
andC:\Gnu\usr\bin
because if I remember correctly, CDT was complaining thatgcc
command was not found. This is from I read, not recommended by everyone, not sure why thought.MINGW_HOME
to/mingw64
mount point location (in my case, path isC:\Gnu\mingw64
).If that does not work out of the box, there is two places to play with some settings:
Windows > Preferences > C/C++ > Build > Settings (Discovery Tab)
You can try to clear entries and reset buttons on the
CDT GCC Built-in Compile Settings MinGW
.Project Properties > C/C++ General > Preprocessor Include Paths, Macros, Etc.
I providers tab, you can try to disable all providers except
CDT GCC Built-in Compile Settings MinGW
,CDT User Settings Entries
andCDT Manager Build Setting Entries
After each try, rebuild CDT index by right-clicking on project and then select
Index > Rebuild
.If it works, it should look something like this (with some differences due to settings of my own project):
Hope this helps
Regards,
Matt
P.S. Tickets are for bugs and feature requests. For support, please use the mailing list instead: https://sourceforge.net/p/msys2/mailman/msys2-users/. By using the mailing list, you will probably also reach more people as I'm pretty sure not all people monitoring the mailing list also monitors the ticketing system
Last edit: Matthieu Vachon 2015-04-10
Setting
MINGW_HOME
toc:\msys64
worked for me. Additionally, I appended thePATH
variable toc:\mys64\usr\bin
which provided the msys2 binaries setup instead of the mingw64 setup. It wasn't necessary to restart eclipse v4.4.2.Matthieu, thanks for responding. Closing now. New issues can be filed on GitHub.