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

Showing 1-7 of 7 messages
Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview) prot...@googlecode.com 11/15/11 2:58 PM
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.


Re: Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview) prot...@googlecode.com 8/9/12 5:59 AM

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


Re: Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview) prot...@googlecode.com 8/9/12 6:00 AM

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

Re: Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview) prot...@googlecode.com 10/21/12 2:44 PM

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" :) ).

Re: Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview) prot...@googlecode.com 10/21/12 3:07 PM

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.

Re: Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview) prot...@googlecode.com 10/22/12 5:09 AM

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.

Re: Issue 344 in protobuf: Compile Error in Visual Studio 2010 and 2011 (developer preview) prot...@googlecode.com 12/5/12 2:10 PM
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.)