Dolphin, the GameCube and Wii emulator - Forums

Full Version: Windows Compile VS 2019 16.6.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, does anyone know why compiling of Dolphin QT fails on VS 2019 16.6.0 in Windows 10? It used to work fine on 16.5.x.
Is it a Dolphin/VS proplem or am I must doing something wrong?

There seems to be some problem related to QT.

Lots of errors during compile at the end... (too much to copy it all in)

The last outputs here are the following:

2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(70,1): error C2440: "return": "std::optional<std::nullopt_t>" kann nicht in "std::optional<int>" konvertiert werden
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(70,1): error C2440:   return result;
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(70,1): error C2440: ^ (Quelldatei wird kompiliert Updater.cpp)
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(70,3): message : Kein benutzerdefinierter Konvertierungsoperator verfügbar, der diese Konvertierung durchführen kann, oder der Operator kann nicht aufgerufen werden
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(70,3): message :   return result;
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(70,3): message :   ^ (Quelldatei wird kompiliert Updater.cpp)
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(29,1): error C2512: "Updater::OnUpdateAvailable::<lambda_2>": Kein geeigneter Standardkonstruktor verfügbar
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(29,1): error C2512:   using OptionalResultT = std::optional<std::result_of_t<F()>>;
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(29,1): error C2512: ^ (Quelldatei wird kompiliert Updater.cpp)
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(29,1): message : Quelltyp konnte von keinem Konstruktor angenommen werden, oder die Überladungsauflösung des Konstruktors ist mehrdeutig
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(29,1): message :   using OptionalResultT = std::optional<std::result_of_t<F()>>;
2>C:\Users\brunn\source\repos\dolphin\Source\Core\DolphinQt\QtUtils\RunOnObject.h(29,1): message : ^ (Quelldatei wird kompiliert Updater.cpp)
2>Die Erstellung des Projekts "DolphinQt.vcxproj" ist abgeschlossen -- FEHLER.
========== Erstellen: 1 erfolgreich, 1 fehlerhaft, 45 aktuell, 1 übersprungen ==========

BlackIce

Im using 16.7.0 and got the same error. Noticed the default C++ Language Standard was std:c++ latest which is C++ 20.
std::result_of was removed in C++ 20. I got it to compile by changing the language to C++ 17
(05-26-2020, 05:29 AM)BlackIce Wrote: [ -> ]Im using 16.7.0 and got the same error. Noticed the default C++ Language Standard was std:c++ latest which is C++ 20.
std::result_of was removed in C++ 20. I got it to compile by changing the language to C++ 17

Thank you, didn't think about this, but even wehen setting it to  C++ 17 I still get the same error messages for some reason... maybe I could try 16.7.0 but I doubt it would change much honestly...
You can install the msvc toolset v14.25 and build with that.

No idea if that's what all the devs are doing.
Okay it seems the def team is aware of the problem and about to fix it (according to this PR: https://github.com/dolphin-emu/dolphin/pull/8841 ).

Thank you all for the help!