PlatformIO Community

[Native] Selection of Compiler

I started working with the native core some weeks ago.

I had a great struggle with selecting a working C++ compiler.
The article about Unit Testing with PlatformIO recommended MinGW but the hyperlink does not lead anywhere.

Would it be possible to have more details on what compiler is recommended? MinGW, MinGW32 mingw-w64, what version?
cygwin64 for example does not compile for me
Im currently using x86_64-12.1.0-release-posix-sjlj-rt_v10-rev3 directly downloaded from github.

I’m not super familiar with Desktop C++ compiler and I think it would be helpful to have “okay download this from this site to get it working 99% of the time”. There are so many GCC C++ compilers for windows and it’s really hard to understand what is going on or is outdated.

I tried to implement some network functionality but i could not get anything to work that uses windows header like windows.h and boost. To implement some test that require network connection boost would be a massive feature.

As suggested by @ivankravets i installed MSYS2 from here https://www.msys2.org/

At first glance it works but i have to test more

For instructions here some notes:
Path Variable
under windows you need to add to the path variable manually both

C:\msys64\mingw64\bin
C:\msys64\usr\bin

this is missing on the installation guide and needed for PIO to compile as otherwise gcc is not available in cmd

gitignore
The example hallo-world has incorrect .gitignore

.pioenvs
.piolibdeps

i think it should be /.pio
otherwise compiled files are tracked