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

[MSVC][std:c++latest] openFrameworks failed to build on MSVC #6832

Closed
xiaoxiao-Xu opened this issue Jan 17, 2022 · 5 comments
Closed

[MSVC][std:c++latest] openFrameworks failed to build on MSVC #6832

xiaoxiao-Xu opened this issue Jan 17, 2022 · 5 comments
Assignees
Milestone

Comments

@xiaoxiao-Xu
Copy link

Hi All,

The MSVC team recently added openFrameworks as part of RWC testing to detect compiler regressions. And we found some errors when building openFrameworks with '/std:c++latest'. Could you please help look at this issue or provide some workarounds? Thanks in advance.

Repro steps:

1. git clone https://github.com/openframeworks/openFrameworks F:\gitP\openframeworks\openFrameworks
2. mkdir F:\gitP\openframeworks\openFrameworks\build_amd64
3. cd F:\gitP\openframeworks\openFrameworks\build_amd64
4. set _CL_= /std:c++latest
5. msbuild /m /p:Platform=x64 /p:Configuration=Release ../libs/openFrameworksCompiled/project/vs/openframeworksLib.vcxproj /t:Rebuild /p:OutDir=F:\gitP\openframeworks\openFrameworks\build_amd64 /p:PlatformToolset=v142

Build log:
build.log

Error info:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3313,22): error C2757: 'filesystem': a symbol with this name already exists and therefore this name cannot be used as a namespace name (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3318,36): error C2039: '_File_time_clock': is not a member of 'boost::filesystem' (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3318,52): error C2061: syntax error: identifier '_File_time_clock' (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3313,22): error C2757: 'filesystem': a symbol with this name already exists and therefore this name cannot be used as a namespace name (compiling source file ..\..\..\openFrameworks\app\ofMainLoop.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,34): error C2065: 'file_clock': undeclared identifier (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3318,36): error C2039: '_File_time_clock': is not a member of 'boost::filesystem' (compiling source file ..\..\..\openFrameworks\app\ofMainLoop.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,23): error C2923: 'std::chrono::time_point': 'file_clock' is not a valid template type argument for parameter '_Clock' (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp) 
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3318,52): error C2061: syntax error: identifier '_File_time_clock' (compiling source file ..\..\..\openFrameworks\app\ofMainLoop.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,34): error C2065: 'file_clock': undeclared identifier (compiling source file ..\..\..\openFrameworks\app\ofMainLoop.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,11): error C2955: 'std::chrono::time_point': use of class template requires template argument list (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,23): error C2923: 'std::chrono::time_point': 'file_clock' is not a valid template type argument for parameter '_Clock' (compiling source file ..\..\..\openFrameworks\app\ofMainLoop.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,34): error C3861: 'file_clock': identifier not found (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3326,22): error C2757: 'filesystem': a symbol with this name already exists and therefore this name cannot be used as a namespace name (compiling source file ..\..\..\openFrameworks\3d\ofCamera.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,11): error C2955: 'std::chrono::time_point': use of class template requires template argument list (compiling source file ..\..\..\openFrameworks\app\ofMainLoop.cpp)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\chrono(3321,34): error C3861: 'file_clock': identifier not found (compiling source file ..\..\..\openFrameworks\app\ofMainLoop.cpp)
@danoli3
Copy link
Member

danoli3 commented Jan 17, 2022 via email

@xiaoxiao-Xu
Copy link
Author

Thanks for your response! BTW, when will this PR be merged to master branch?

@2bbb
Copy link
Contributor

2bbb commented Jan 17, 2022

related #6585

@ofTheo
Copy link
Member

ofTheo commented Mar 9, 2022

also see #6844 which should be merged soon.
c++17 and filesystem should all be good in that branch.

Will see if I can reproduce with the steps you listed or see if it is fixed.
Thanks!

@ofTheo ofTheo added this to the 0.12.0 milestone Mar 9, 2022
@ofTheo ofTheo self-assigned this Mar 9, 2022
@ofTheo ofTheo mentioned this issue Mar 9, 2022
77 tasks
@dimitre dimitre modified the milestones: 0.12.0, 0.12.1 Aug 31, 2023
@danoli3
Copy link
Member

danoli3 commented Aug 27, 2024

This is completed since #8052

@danoli3 danoli3 closed this as completed Aug 27, 2024
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

5 participants