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] Cinder failed to build with /std:c++latest on MSVC #2261

Open
QuellaZhang opened this issue Dec 10, 2021 · 2 comments
Open

Comments

@QuellaZhang
Copy link

Cinder failed to build with /std:c++latest on MSVC. Could you please help look at this issue or provide some workarounds? Thanks in advance.

Build steps:

  1. open VC2019 x64 tools command
  2. git clone https://github.com/cinder/Cinder F:\gitP\cinder\Cinder
  3. mkdir F:\gitP\cinder\Cinder\build_amd64
  4. cd F:\gitP\cinder\Cinder\build_amd64
  5. cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=10.0.18362.0 -DCMAKE_BUILD_TYPE=Release -DCINDER_BUILD_TESTS=ON ..
  6. set CL= /std:c++latest
  7. msbuild /m /p:Platform=x64 /p:Configuration=Release cinder.sln /t:Rebuild > build.log

Build log: build_stdc++latest.log

Build error:
F:\gitP\cinder\Cinder\include\tinyexr\tinyexr.h(7074,16): error C7626: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes (compiling source file F:\gitP\cinder\Cinder\src\tinyexr\tinyexr.cc) [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\CaptureImplDirectShow.cpp(45,100): error C2039: 'unique': is not a member of 'std::shared_ptr<cinder::Surface8u>' [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\include\cinder/app/msw/AppImplMswBasic.h(88,35): error C3240: 'toggleFullScreen': must be a non-overloaded abstract member function of 'cinder::app::WindowImplMsw' (compiling source file F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMswBasic.cpp) [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\include\cinder/app/msw/AppImplMswBasic.h(88,35): error C2838: 'toggleFullScreen': illegal qualified name in member declaration (compiling source file F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMswBasic.cpp) [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\ImageTargetFileWic.cpp(177,38): error C2440: '=': cannot convert from 'const wchar_t [13]' to 'LPOLESTR' [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMsw.cpp(915,63): error C2668: 'cinder::app::WindowImplMsw::toPoints': ambiguous call to overloaded function [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMsw.cpp(915,85): error C2668: 'cinder::app::WindowImplMsw::toPoints': ambiguous call to overloaded function [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\include\cinder/app/msw/AppImplMswBasic.h(88,35): error C3240: 'toggleFullScreen': must be a non-overloaded abstract member function of 'cinder::app::WindowImplMsw' (compiling source file F:\gitP\cinder\Cinder\src\cinder\app\msw\AppMsw.cpp) [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\include\cinder/app/msw/AppImplMswBasic.h(88,35): error C2838: 'toggleFullScreen': illegal qualified name in member declaration (compiling source file F:\gitP\cinder\Cinder\src\cinder\app\msw\AppMsw.cpp) [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMsw.cpp(915,20): error C2661: 'cinder::app::MouseEvent::MouseEvent': no overloaded function takes 5 arguments [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMsw.cpp(977,76): error C2668: 'cinder::app::WindowImplMsw::toPoints': ambiguous call to overloaded function [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMsw.cpp(977,107): error C2668: 'cinder::app::WindowImplMsw::toPoints': ambiguous call to overloaded function [F:\gitP\cinder\Cinder\build_amd64\cinder.vcxproj]
F:\gitP\cinder\Cinder\src\cinder\app\msw\AppImplMsw.cpp(977,116): error C2661: 'cinder::app::FileDropEvent::FileDropEvent': no overloaded function takes 2 arguments
F:\gitP\cinder\Cinder\include\cinder/msw/OutputDebugStringStream.h(52,29): error C3861: 'str': identifier not found (compiling source file F:\gitP\cinder\Cinder\src\cinder\app\msw\PlatformMsw.cpp)
F:\gitP\cinder\Cinder\include\cinder/msw/OutputDebugStringStream.h(84,16): error C3861: 'rdbuf': identifier not found (compiling source file F:\gitP\cinder\Cinder\src\cinder\app\msw\PlatformMsw.cpp)

@andrewfb andrewfb mentioned this issue Dec 22, 2021
@andrewfb
Copy link
Collaborator

Let me know if #2262 addresses what you're seeing

@QuellaZhang
Copy link
Author

QuellaZhang commented Dec 27, 2021

Thanks! These known issues have been fixed. A new error was triggered, this should be the last one.

TestMain.cpp
F:\gitP\cinder\Cinder\test\unit\src\catch.hpp(8459,19): error C2039: 'uncaught_exception': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\iostream(19): note: see declaration of 'std'
F:\gitP\cinder\Cinder\test\unit\src\catch.hpp(8459,12): error C3861: 'uncaught_exception': identifier not found
F:\gitP\cinder\Cinder\test\unit\src\catch.hpp(8782,22): error C2039: 'uncaught_exception': is not a member of 'std'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\iostream(19): note: see declaration of 'std'
F:\gitP\cinder\Cinder\test\unit\src\catch.hpp(8782,16): error C3861: 'uncaught_exception': identifier not found

F:\gitP\cinder\Cinder\include\cinder/Json.h(233,1): error C2440: 'type cast': cannot convert from 'int' to 'T'
with
[
T=std::string
]
F:\gitP\cinder\Cinder\include\cinder/Json.h(233,1): note: No constructor could take the source type, or constructor overload resolution was ambiguous
F:\gitP\cinder\Cinder\test\unit\src\JsonTest.cpp(26): note: see reference to function template instantiation 'T cinder::JsonTree::getValue<std::string>(void) const' being compiled
with
[
T=std::string
]

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