GarageGames / Torque2D

MIT Licensed Open Source version of Torque 2D game engine from GarageGames
MIT License
1.67k stars 1.56k forks source link

Compile gtest-all.cc failed to build on Windows with MSVC "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'" #428

Closed YangYang129 closed 2 years ago

YangYang129 commented 2 years ago

Compile gtest-all.cc failed to "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'". It can reproduces on version72c8891 on master branch. Could you please help look at this issue? Thank you very much

Environment

Compiler version: VS2019 (16.11.2) Operating system: Windows server 2016

Reproduce steps:

  1. git clone https://github.com/GarageGames/Torque2D F:\
  2. cd Torque2D\engine\source\testing\googleTest
  3. mkdir build_amd64test
  4. cd build_amd64test
  5. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -Dgtest_build_tests=ON -DGTEST_HAS_TR1_TUPLE=1 -DGTEST_CREATE_SHARED_LIBRARY=1 ..
  6. set CL=/wd4996
  7. msbuild /p:Configuration=Release;Platform=x64 gtest.sln /t:Rebuild /m

Error log: msbuildx64.log

Error info: 36>F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(711,69): 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' [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj] 36>F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(747,2): error C3855: 'std::tuple_element': template parameter '_Index' is incompatible with the declaration [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj] 36>F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(759,10): error C2039: 'type': is not a member of 'std::tuple_element' [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj] F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(744): message : see declaration of 'std::tuple_element' [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj] 36>F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(759,10): error C2146: syntax error: missing '>' before identifier 'type' [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj] 36>F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(759): error C2062: type 'unknown-type' unexpected [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj] 36>F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(759,10): error C2039: 'type': is not a member of '`global namespace'' [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj] 36>F:\Torque2D\engine\source\testing\googleTest\include\gtest/internal/gtest-tuple.h(760,1): error C2334: unexpected token(s) preceding '{'; skipping apparent function body [F:\Torque2D\engine\source\testing\googleTest\build_amd64test\gtest_main_use_own_tuple.vcxproj]

greenfire27 commented 2 years ago

All torque engines have moved to a new organization, Torque Game Engines. Torque2D can be found at https://github.com/TorqueGameEngines/Torque2D. This repository will not be updated. We encourage you to use the new repository instead of this one. Thank you!

YangYang129 commented 2 years ago

@greenfire27 Thank you for your reply and info. This issue can still repro in new repository. I will close this issue in this old repository and open a new issue in new repository https://github.com/TorqueGameEngines/Torque2D/issues/39