Compilation fails in gtest-tuple.h

1,004 views
Skip to first unread message

Soudha Parthasarathi

unread,
Aug 11, 2015, 1:21:51 PM8/11/15
to Google C++ Testing Framework
Hi,

I'm working on windows environment and i have created a visual studio 2013 project.
I'm trying to use google test 1.7.0 frame work and facing compilation error "Error    3    error C2888: 'std::tuple_size<std::tr1::tuple<void,void,void,void,void,void,void,void,void,void>>' : symbol cannot be defined within namespace 'tr1'    C:\Users\admin\Documents\igmp-work-porting\sw_igmp_manager\test\googletest\include\gtest\internal\gtest-tuple.h    711  "
And the code at the line that shows error is
template <GTEST_0_TYPENAMES_(T)>
struct tuple_size<GTEST_0_TUPLE_(T)> { static const int value = 0; };

I could successfully build and test on linux.

It would be great if someone can help me in fixing this issue.

Thanks
Soudha

Samuel Benzaquen

unread,
Aug 11, 2015, 5:18:09 PM8/11/15
to Soudha Parthasarathi, Google C++ Testing Framework
Can you share a little more about your setup?
I believe that header should not be included in your build since tr1::tuple is already available there.
Are you including this header manually?

_Sam

--

---
You received this message because you are subscribed to the Google Groups "Google C++ Testing Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to googletestframe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--


Dario Mangoni

unread,
Sep 15, 2015, 11:17:54 AM9/15/15
to Google C++ Testing Framework, soudhapar...@gmail.com
Hey wait,
I didn't delete the cache.
Actually the problem was gtest_build_tests.
Switching it off gives no problems

Dario Mangoni

unread,
Sep 15, 2015, 11:17:54 AM9/15/15
to Google C++ Testing Framework, soudhapar...@gmail.com
Hi,
I'm facing the same problem.
I'm compiling with MSVS2013 with default compiler for x64 architecture. I just downloaded gtest-1.7.0 and set up the project with CMake using default settings except for
gtest_disable_pthreads ON
gtest_build_samples ON
When I try to build the solution it gives me that error.
I didn't include anything manually.

Thanks,
Dario


Il giorno martedì 11 agosto 2015 16:18:09 UTC-5, Samuel Benzaquen ha scritto:

Evan Davies

unread,
Feb 9, 2016, 5:30:02 PM2/9/16
to Google C++ Testing Framework, soudhapar...@gmail.com
#define GTEST_USE_OWN_TR1_TUPLE 0 
Reply all
Reply to author
Forward
0 new messages