1

Im trying to get googletest to compile in eclipse with minGW however i keep running into an error which is error: '::OpenThread' has not been declared.

using googletest in eclipse: how? i've followed this guide on setting it up and im still not getting it to work. I've tried a couple of different things but i cant get it to work properly.

One thing that sort of made it work was changing the function OpenThread to OpenProcess. In doing so, it lets me run tests, however if all tests do not pass, the program crashes with the error message "Condition thread != NULL failed."

Ghiqqq
  • 31
  • 5

1 Answers1

1

Okay i managed to get it to work now, i added -D_WIN32_WINNIT=0x0501.

Right click gtest-all.cc

Go to settings

Click on C/C++ Build -> Settings

Click on Tool Settings tab -> GCC C++ Compiler -> Preprocessor

Click on Add on Defined symbols (-D)

Type in _WIN32_WINNT=0x0501

Rebuild and compile and it should work!

Pic of eclipse

Ghiqqq
  • 31
  • 5