leapmotion / autowiring

A C++ Inversion of Control Framework
http://autowiring.io/
Apache License 2.0
149 stars 17 forks source link

Build failure of the google-test dependency on Windows using MSVC. #1062

Closed PhoebeHui closed 6 years ago

PhoebeHui commented 6 years ago

Build Autowiring with msvc on windows currently blocked by the following issue, this issue has fixed on Goolgetest, could you help pick up it in Autowiring?

The next release msvc toolset will have this behavior.

See background in [https://github.com/google/googletest/issues/1616], and the fix [https://github.com/google/googletest/pull/1620].

The failures like: d:\autowiring\src\contrib\gtest-1.7.0\fused-src\gtest\gtest.h(9436,1): error C2593: 'operator <<' is ambiguous [D:\Autowiring\build_x86\src\autowiring\test\AutowiringTest.vcxproj] d:\autowiring\src\contrib\gtest-1.7.0\fused-src\gtest\gtest.h(9436,1): error C2593: os << value; [D:\Autowiring\build_x86\src\autowiring\test\AutowiringTest.vcxproj] d:\autowiring\src\contrib\gtest-1.7.0\fused-src\gtest\gtest.h(9436,1): error C2593: ^ [D:\Autowiring\build_x86\src\autowiring\test\AutowiringTest.vcxproj] d:\autowiring\src\contrib\gtest-1.7.0\fused-src\gtest\gtest.h(9436,1): error C2593: 'operator <<' is ambiguous [D:\Autowiring\build_x86\src\autowiring\test\AutowiringTest.vcxproj] d:\autowiring\src\contrib\gtest-1.7.0\fused-src\gtest\gtest.h(9436,1): error C2593: os << value; [D:\Autowiring\build_x86\src\autowiring\test\AutowiringTest.vcxproj] d:\autowiring\src\contrib\gtest-1.7.0\fused-src\gtest\gtest.h(9436,1): error C2593: ^ [D:\Autowiring\build_x86\src\autowiring\test\AutowiringTest.vcxproj] d:\autowiring\src\contrib\gtest-1.7.0\fused-src\gtest\gtest.h(9436,1): error C2593: 'operator <<' is ambiguous [D:\Autowiring\build_x86\src\autowiring\test\AutowiringTest.vcxproj]

You can repro this issue by following steps: 1.Open VS2017 x86 Native tools command tool 2.git clone https://github.com/leapmotion/autowiring d:\Autowiring\src 3.cd D:\Autowiring

  1. set CL=/D_HAS_AUTO_PTR_ETC=1 /std:c++latest 5.mkdir build_x86 && pushd build_x86 6.cmake -G "Visual Studio 15 2017" -DCMAKE_SYSTEM_VERSION=10.0.16299.0 ..\src\ 7.msbuild /m /p:Configuration=Release;Platform=Win32 Autowiring.sln /t:Rebuild
hham commented 6 years ago

@PhoebeHui, can you check it out now? #1063 has been merged.

PhoebeHui commented 6 years ago

Thank you hham for fix this issue quickly! I verified, it works well, thanks again!