-2

我试图在 Vs2010 中构建 64 位的 Google 协议,但我收到了大量的链接器和其他错误。我下载了 protobuf-2.4.1.zip 并进入“vsprojects”文件夹,然后在 VS2010 中以 64 位架构打开 sln 文件。关于如何构建它的任何解决方案?这些是错误。

Error   2   error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    757 1   gtest
Error   5   error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    761 1   gtest
Error   8   error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    769 1   gtest
Error   11  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    773 1   gtest
Error   14  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    781 1   gtest
Error   17  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    785 1   gtest
Error   20  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    793 1   gtest
Error   23  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    797 1   gtest
Error   26  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    805 1   gtest
Error   29  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    809 1   gtest
Error   32  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    817 1   gtest
Error   35  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    821 1   gtest
Error   38  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    829 1   gtest
Error   41  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    833 1   gtest
Error   44  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    841 1   gtest
Error   47  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    845 1   gtest
Error   50  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    853 1   gtest
Error   53  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    857 1   gtest
Error   56  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    865 1   gtest
Error   59  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    869 1   gtest
Error   62  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    876 1   gtest
Error   65  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    882 1   gtest
Error   69  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    757 1   gtest
Error   72  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    761 1   gtest
Error   75  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    769 1   gtest
Error   78  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    773 1   gtest
Error   81  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    781 1   gtest
Error   84  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    785 1   gtest
Error   87  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    793 1   gtest
Error   90  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    797 1   gtest
Error   93  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    805 1   gtest
Error   96  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    809 1   gtest
Error   99  error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    817 1   gtest
Error   102 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    821 1   gtest
Error   105 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    829 1   gtest
Error   108 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    833 1   gtest
Error   111 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    841 1   gtest
Error   114 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    845 1   gtest
Error   117 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    853 1   gtest
Error   120 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    857 1   gtest
Error   123 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    865 1   gtest
Error   126 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    869 1   gtest
Error   129 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    876 1   gtest
Error   132 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    882 1   gtest
Error   136 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    757 1   gtest
Error   139 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    761 1   gtest
Error   142 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    769 1   gtest
Error   145 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    773 1   gtest
Error   148 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    781 1   gtest
Error   151 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    785 1   gtest
Error   154 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    793 1   gtest
Error   157 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    797 1   gtest
Error   160 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    805 1   gtest
Error   163 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    809 1   gtest
Error   166 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    817 1   gtest
Error   169 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    821 1   gtest
Error   172 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest

\include\gtest\internal\gtest-tuple.h   829 1   gtest
    Error   175 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    833 1   gtest
    Error   178 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    841 1   gtest
    Error   181 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    845 1   gtest
    Error   184 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    853 1   gtest
    Error   187 error C2039: 'type' : is not a member of 'std::tr1::tuple_element'  c:\users\Adam\downloads\protobuf-2.4.1\protobuf-2.4.1\gtest\include\gtest\internal\gtest-tuple.h    857 1   gtest
 2.4.1\gtest\include\gtest\internal\gtest-tuple.h   745 1   test_plugin
    Error   471 error LNK1104: cannot open file 'C:\Users\Adm\Downloads\protobuf-2.4.1\protobuf-2.4.1\vsprojects\Debug\libprotobuf.lib' C:\Users\Adam\Downloads\protobuf-2.4.1\protobuf-2.4.1\vsprojects\LINK   protoc
    Error   482 error MSB6006: "cmd.exe" exited with code 9009. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets   151 6   lite-test
    Error   542 error MSB6006: "cmd.exe" exited with code 9009. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets   151 6   tests
4

1 回答 1

1

这些错误在gtest项目中,libprotobuf应该编译和链接正常。如果您需要更改 protobuf 库并在其上运行测试,请尝试单独下载gtest框架,我认为旧版本与 protobuf 捆绑在一起,新版本应该与 VS2010 构建良好。

于 2012-10-17T13:56:28.070 回答