Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio 2017, c++17, error C3083: 'tr1': the symbol to the left of a '::' must be a type #1138

Closed
coder0xff opened this issue Jul 2, 2017 · 2 comments

Comments

@coder0xff
Copy link

When I build a test project in a Visual Studio 2017 with the Properties > C/C++ > Language > C++ Language Standard set to /std:c++lastest, I get build errors in gtest-port.h and gtest-printers.h. It works fine when set to /std:c++14. Here is the full build output:

1>------ Build started: Project: parlex_test, Configuration: Debug Win32 ------
1>test.cpp
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1031): error C2039: 'tr1': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\sstream(13): note: see declaration of 'std'
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1031): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1032): error C2039: 'tr1': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\sstream(13): note: see declaration of 'std'
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1032): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1033): error C2039: 'tr1': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\sstream(13): note: see declaration of 'std'
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1033): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1034): error C2039: 'tr1': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\sstream(13): note: see declaration of 'std'
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1034): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1035): error C2039: 'tr1': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\sstream(13): note: see declaration of 'std'
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/internal/gtest-port.h(1035): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(613): error C2039: 'tr1': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\iterator(15): note: see declaration of 'std'
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(613): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(618): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(623): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(628): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(633): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(638): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(645): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(652): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(659): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(666): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(674): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(891): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(891): note: see reference to class template instantiation 'testing::internal::TuplePolicy<TupleT>::tuple_element<I>' being compiled
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(899): note: see reference to class template instantiation 'testing::internal::TuplePolicy<TupleT>' being compiled
1>C:\Users\Brent\Desktop\plange.build\Dependencies\googletest\include\gtest/gtest-printers.h(895): error C3083: 'tr1': the symbol to the left of a '::' must be a type
1>Done building project "parlex_test.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========

@KindDragon
Copy link
Contributor

Duplicate of #1111

@KindDragon
Copy link
Contributor

Can be closed. PR #1218 fixed this

bilke pushed a commit to bilke/ogs that referenced this issue Dec 19, 2018
The original gtest folder is removed.

Reason is the removed namespace std::tr1 no longer available in the VS2017.
Fixed in PR google/googletest#1218
and the related issue is google/googletest#1138
jbathmann pushed a commit to jbathmann/ogs that referenced this issue Mar 5, 2019
The original gtest folder is removed.

Reason is the removed namespace std::tr1 no longer available in the VS2017.
Fixed in PR google/googletest#1218
and the related issue is google/googletest#1138
wolf-pf pushed a commit to wolf-pf/ogs that referenced this issue Mar 27, 2019
The original gtest folder is removed.

Reason is the removed namespace std::tr1 no longer available in the VS2017.
Fixed in PR google/googletest#1218
and the related issue is google/googletest#1138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants