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] Ppsspp failed to build with msvc due to error C2679, error C2665 on Windows #16324

Open
2 of 5 tasks
fangzhouxia opened this issue Nov 2, 2022 · 7 comments

Comments

@fangzhouxia
Copy link

fangzhouxia commented Nov 2, 2022

Game or games this happens in

None

What area of the game / PPSSPP

Hi all,
PPsspp fails to build on MSVC due to error C2665, error C2679. Could you help look?
we use commit is b42f6d7.
Repro steps

  1. git clone --recursive https://github.com/hrydgard/ppsspp.git F:\gitP\hrydgard\ppsspp_new
  2. set CL= /std:c++latest
  3. F:\gitP\hrydgard\ppsspp_new
  4. makir build_amd64
  5. cd F:\gitP\hrydgard\ppsspp_new\build_amd64
  6. msbuild /m /p:Platform=x64 /p:Configuration=Release ../Windows/PPSSPP.sln /t:Rebuild /p:OutDir=F:\gitP\hrydgard\ppsspp_new\build_amd64

error info
F:\gitP\hrydgard\ppsspp\ext\armips\ext\tinyformat\tinyformat.h(342,9): error C2679: binary '<<': no operator found which takes a right-hand operand of type 'const T' (or there is no acceptable conversion) [F:\gitP\hrydgard\ppsspp\ext\libarmips.vcxproj]
F:\gitP\hrydgard\ppsspp\ext\armips\Core\Common.cpp(53,9): error C2665: 'std::basic_string<char,std::char_traits,std::allocator>::basic_string': no overloaded function could convert all the argument types [F:\gitP\hrydgard\ppsspp\ext\libarmips.vcxproj]

What should happen

Build successfully

Logs

build.log

Platform

Windows

Mobile phone model or graphics card

None

PPSSPP version affected

None

Last working version

None

Graphics backend (3D API)

Other

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@hrydgard
Copy link
Owner

hrydgard commented Nov 2, 2022

Seems like another one where it's building with a too old C++ standard, for some reason?

@unknownbrackets
Copy link
Collaborator

Well, I guess maybe std:c++latest would use c++20? This seems to be a tinyformat issue (dependency of armips), so two layers of indirection from ppsspp itself.

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Nov 2, 2022

@Kingcom just fyi

@hrydgard
Copy link
Owner

hrydgard commented Nov 2, 2022

Or maybe only an old version of MSVC is installed, so latest isn't actually that new?

@unknownbrackets
Copy link
Collaborator

Well, the build log says Visual Studio 2019. It also says warning C4996: 'std::is_pod<T>': warning STL4025: std::is_pod and std::is_pod_v are deprecated in C++20.

-[Unknown]

@Kingcom
Copy link
Contributor

Kingcom commented Nov 2, 2022

All of the errors seem to be about std::basic_string<char8_t,std::char_traits<char8_t>,std::allocator<char8_t>>, or std::u8string in short. This is only available in C++20. I'm not able to reproduce this with VS 2022 (v17.0.4 per vcvars), so my guess is that the version used does not have complete support for char8_t.

@Kingcom
Copy link
Contributor

Kingcom commented Nov 2, 2022

Ah, this only happens if ARMIPS_USE_STD_FILESYSTEM is set... so only when it uses Microsoft's std::filesystem implementation and not ghc.

Either way, C++20 is not the most backwards compatible of standards, is there any reason for not sticking to what ppsspp defines?

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

4 participants