Cannot build gmock on Solaris 10

439 views
Skip to first unread message

dev123

unread,
Jan 22, 2014, 4:29:58 AM1/22/14
to googl...@googlegroups.com
Hi I get the following errors when trying to build gmock-1.7.0 on Solaris (SunOS bs-solaris10x86 5.10 Generic_147441-01 i86pc i386 i86pc):

"build/gmock-1.7.0/include/gmock/gmock-matchers.h", line 3329: Error: iterator_traits is not a member of std.
"build/gmock-1.7.0/include/gmock/gmock-matchers.h", line 3329: Error: "," expected instead of "<".
...
"build/gtest-1.7.0/src/gtest.cc", line 1786: Error: Could not find a match for std::vector<std::string>::vector(const char*const[8], const char*const*) needed in testing::ArrayAsVector<8>(const char*const(&)[8]).
"build/gtest-1.7.0/src/gtest.cc", line 1792:     Where: While instantiating "testing::ArrayAsVector<8>(const char*const(&)[8])".
"build/gtest-1.7.0/src/gtest.cc", line 1792:     Where: Instantiated from non-template code.

I have updated to build with: -library=stlport4



That eliminates the above errors but then I get some new ones:

"build/gtest-1.7.0/src/gtest-printers.cc", line 268: Error: Could not find a match for PrintAsStringLiteralTo needed in testing::internal::PrintCharsAsStringTo<char>(const char*, unsigned, std::ostream *).
"build/gtest-1.7.0/src/gtest-printers.cc", line 315:     Where: While instantiating "testing::internal::PrintCharsAsStringTo<char>(const char*, unsigned, std::ostream *)".
"build/gtest-1.7.0/src/gtest-printers.cc", line 315:     Where: Instantiated from non-template code.
1 Error(s) detected.


I found this:

which mentions setting:   -template=no%extdef

But where should I do that - adding it to my CCFLAGS does not help.

Anyone had success on building gmock/gtest on Solaris?

Steve Read

unread,
Apr 7, 2014, 12:33:49 PM4/7/14
to googl...@googlegroups.com

Vikash Kumar

unread,
Nov 9, 2016, 10:40:07 AM11/9/16
to Google C++ Mocking Framework
Anyone has figured it out yet? Still getting the error on solaris 10 
Reply all
Reply to author
Forward
0 new messages