cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with gtest in Cube IDE

benjamin123
Associate

I am trying to use google test on a project in the cube IDE. I am using a sample "hello world" project. I have referenced various tutorials and instructions and here are my settings. My google test library is downloaded via msys2 and I am running a PC build with the latest installed cubeIDE, msys2 etc. 

C++ and C compilers. 

benjamin123_1-1727333040046.png

C++ linker:

benjamin123_0-1727333005995.png

However, I am getting the following errors:

benjamin123_0-1727333282641.png

It seems to me that the C++ standard is the cause. But I have change the compiler to use various C++ standards and I still get this error. 

Would appreciate if I can get some help on this. I will provide additional detail if needed. Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
benjamin123
Associate

I have solved my problem. It seems that the mingw environment is mapped to C:\msys64\ucrt64 and ucrt64 does not support the gtest library well. So I changed the environment variable to C:\msys64\mingw64 and now it works. 

benjamin123_0-1727336541472.png

 

View solution in original post

1 REPLY 1
benjamin123
Associate

I have solved my problem. It seems that the mingw environment is mapped to C:\msys64\ucrt64 and ucrt64 does not support the gtest library well. So I changed the environment variable to C:\msys64\mingw64 and now it works. 

benjamin123_0-1727336541472.png