MinGW build issues

381 views
Skip to first unread message

Alex Shaver

unread,
Nov 18, 2015, 8:33:31 PM11/18/15
to Google C++ Testing Framework
I'm playing around with compiling on windows for once, using CLion and MinGW 3.21, and google test (from head of github) throws the following errors;

  1. C:/<PATH_HIDDEN>/TEST/googletest/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::StrCaseCmp(const char*, const char*)':
  2. C:/<PATH_HIDDEN>/TEST/googletest/googletest/include/gtest/internal/gtest-port.h:2323:25: error: '_stricmp' was not declared in this scope
  3.   return _stricmp(s1, s2);
  4.                         ^
  5. C:/<PATH_HIDDEN>/TEST/googletest/googletest/include/gtest/internal/gtest-port.h: In function 'char* testing::internal::posix::StrDup(const char*)':
  6. C:/<PATH_HIDDEN>/TEST/googletest/googletest/include/gtest/internal/gtest-port.h:2325:58: error: '_strdup' was not declared in this scope
  7. inline char* StrDup(const char* src) { return _strdup(src); }

Whole error can be found http://pastebin.com/kK70t8XM

It seems like it's spitting up on posix stuff mostly. I tried to download mingw-w64, but Clion is having none of it (not this problem, admittedly). 

Am I using the wrong compiler? I can't really tell. I tried compiling with CMake flag -DMINGW=1 but that didn't seem to change anything.
Reply all
Reply to author
Forward
0 new messages