Open ingo-h opened 3 years ago
I had this same issue and it turned out that two preprocesser macros were conflicting with one another. Specifically, these two macros in gtest-port.h both returned true and defined the class testing::internal::ThreadWithParamBase
.
I ended up fixing it by changing !GTEST_OS_WINDOWS_MINGW
to !GTEST_OS_WINDOWS
in the first #if
statement on line 1253 to have the preprocessor only select line 1338 as true.
Describe the bug
pthreads4w is installed and working. I can compile programs with it. If I build googletest with default settings it does not detect pthread. pthreads4w can only be compiled with Generator "NMake Makefiles". If I try to also compile googletest with that Generator build fails with a bunch of error messages.
I expect that configuration and build of googletest detect third party pthread installation on Microsoft Windows and successful compile it with default Generator "Visual Studio *" and with Generator "NMake Makefiles" and then use POSIX threads.
Steps to reproduce the bug
First Install third party POSIX Threads for Windows. Then configure googletest with default settings using PowerShell:
As shown header files are found but pthread isn't detected. Following build of googletest works but without multithreading. If Configuring with Generator "NMake Makefiles" I get:
Looks good so far. But with building I get:
Does the bug persist in the most recent commit? Yes.
What operating system and version are you using?
From a cmd prompt:
What compiler and version are you using?
What build system are you using?