• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 … 7 8 9 10 11 … 117 Next »

Deprecated C++ function used in Dolphin source code
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Deprecated C++ function used in Dolphin source code
07-04-2020, 05:21 AM
#1
TheNarcor
Unregistered
 
Bug 
Hi, I'm new here and wish to report a bug. If this is not the correct site for this, please correct me.

Was building Dolphin from source in VS2019 and came across build errors due to the use of the function std::result_of which is deprecated in newer versions of C++. I was able to work around the issue by modifying the source code myself and replacing all instances of the deprecated function with std::invoke_result, related StackOverflow page here.

Happy to provide more information as needed. This issue affects compilation of all Config versions (Release/Debug, x64/ARM64), and I am building on Windows. Hoping to save someone the trouble of debugging this down the line!
Reply
07-04-2020, 06:17 AM
#2
JosJuice Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 9,028
Threads: 7
Joined: Oct 2014
This is a known problem. The only instances of std::result_of that are left right now are the ones in Qt. So it should work fine as long as you manually install the latest version of Qt and configure the Dolphin build to use it. We haven't gotten around to updating the Externals Qt yet, unfortunately...
Find
Reply
07-16-2020, 11:43 AM
#3
Modception Offline
Junior Member
**
Posts: 18
Threads: 0
Joined: May 2020
I found you can also install the previous toolset 14.25.28610 from the installer and then change a VS2019 file so VS defaults to using it. A bad idea if you're working with more repos than just dolphin, because it will always use 14.25. Won't change any build files.

Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v142.default.props

Not sure if there's a different way to change it for just dolphin WITHOUT changing any build files. Otherwise, it's a huge hassle having to keep switching toolset versions when trying to PR stuff.
Find
Reply
07-19-2020, 01:35 AM
#4
chrisis123 Offline
Junior Member
**
Posts: 23
Threads: 2
Joined: May 2020
(07-04-2020, 05:21 AM)TheNarcor Wrote: Hi, I'm new here and wish to report a bug. If this is not the correct site for this, please correct me.

Was building Dolphin from source in VS2019 and came across build errors due to the use of the function std::result_of which is deprecated in newer versions of C++. I was able to work around the issue by modifying the source code myself and replacing all instances of the deprecated function with std::invoke_result, related StackOverflow page here.

Happy to provide more information as needed. This issue affects compilation of all Config versions (Release/Debug, x64/ARM64), and I am building on Windows. Hoping to save someone the trouble of debugging this down the line!

At this time there is exactly one occurence of std::result_of left in the provided Qt files - obviously you can just build either against the old platform toolset or point VS to a newer Qt version, for a quick fix it's also enough (albeit hacky obviously) to replace the single occurence in the file \Externals\Qt\Qt5.14.1\msvc2019_64\include\QtCore\qobjectdefs.h (if building for win64) with std::invoke_result
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma