Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview)

253 views
Skip to first unread message

prot...@googlecode.com

unread,
Nov 15, 2011, 5:58:54 PM11/15/11
to prot...@googlegroups.com
Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 344 by kengong2...@gmail.com: Compile Error in Visual Studio 2010
and 2011 (developer preview)
http://code.google.com/p/protobuf/issues/detail?id=344

What steps will reproduce the problem?
1.launch .sln in VS 2010 or VS11 and compile.

What is the expected output? What do you see instead?
Same Template errors reported in both IDE

What version of the product are you using? On what operating system?
v2.4

Please provide any additional information below.


prot...@googlecode.com

unread,
Aug 9, 2012, 8:59:43 AM8/9/12
to prot...@googlegroups.com

Comment #1 on issue 344 by elivei...@gmail.com: Compile Error in Visual
Studio 2010 and 2011 (developer preview)
http://code.google.com/p/protobuf/issues/detail?id=344

1) open .sln with VS 2010 and run conversion wizard
2) set configuration to debug
3) build solution

Result:
Error 1 error C3855: 'std::tr1::tuple_element': template parameter '_Idx'
is incompatible with the declaration
e:\appinstall\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h 745
Error 2 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'
e:\appinstall\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h 757
Error 3 error C2146: syntax error : missing ',' before identifier 'type'
e:\appinstall\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h 757


prot...@googlecode.com

unread,
Aug 9, 2012, 9:00:43 AM8/9/12
to prot...@googlegroups.com

Comment #2 on issue 344 by elivei...@gmail.com: Compile Error in Visual
Studio 2010 and 2011 (developer preview)
http://code.google.com/p/protobuf/issues/detail?id=344

This was with version 2.4.1

prot...@googlecode.com

unread,
Oct 21, 2012, 5:44:11 PM10/21/12
to prot...@googlegroups.com

Comment #3 on issue 344 by valiko...@gmail.com: Compile Error in Visual
Studio 2010 and 2011 (developer preview)
http://code.google.com/p/protobuf/issues/detail?id=344

Error 1 is easily fixed by replacing "int" with "size_t" in the definition
of tuple_element:

template <size_t k, class Tuple>
struct tuple_element {

To get rid of other errors I had to disable tuples in tests at all:

#define GTEST_HAS_TR1_TUPLE 0

in gtest-port.h (by the way, correct the typo in this file: "with be"
-> "will be" :) ).

prot...@googlecode.com

unread,
Oct 21, 2012, 6:07:58 PM10/21/12
to prot...@googlegroups.com

Comment #4 on issue 344 by valiko...@gmail.com: Compile Error in Visual
Studio 2010 and 2011 (developer preview)
http://code.google.com/p/protobuf/issues/detail?id=344

Oh, I've just noticed fix for errors 2 and 3 in the issue 389.

prot...@googlecode.com

unread,
Oct 22, 2012, 8:09:38 AM10/22/12
to prot...@googlegroups.com

Comment #5 on issue 344 by elivei...@gmail.com: Compile Error in Visual
Studio 2010 and 2011 (developer preview)
http://code.google.com/p/protobuf/issues/detail?id=344

Thanks. I worked around this by disabling the tests.

prot...@googlecode.com

unread,
Dec 5, 2012, 5:10:02 PM12/5/12
to prot...@googlegroups.com
Updates:
Status: Duplicate
Mergedinto: 398

Comment #6 on issue 344 by liu...@google.com: Compile Error in Visual
Studio 2010 and 2011 (developer preview)
http://code.google.com/p/protobuf/issues/detail?id=344

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages