terminal: Large number of "'function' is not a member of 'std'" errors

I just cloned this repo per the instructions, and opened OpenConsole.sln in VS 2019, restored the nuget packages, and ran “Build Solution”, and I’m getting hundreds of errors. They seem to stem from most projects failing with errors like the below:

Error	C2039	'function': is not a member of 'std'	RendererBase	C:\src\github\Terminal\src\buffer\out\textBuffer.hpp	146	

Doing the suggested quickfix of adding #include <functional> seems to clear the errors on the first few I tried, but this is so endemic it would take a while to fix everywhere. Perhaps it was the upgrade to VS 2019 using different default settings from VS 2017?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 6
  • Comments: 18 (11 by maintainers)

Most upvoted comments

If you’re trying to build on VS19, add #include <functional> below #include <filesystem> in LibraryIncludes.h

@willmsbuild openconsole.sln /p:Platform=x64 should do it. I had the same issue with it using ARM as the default platform.

Project 'Microsoft.UI.Xaml.Markup' could not be loaded because it's missing install components. To fix this launch Visual Studio installer with the following selections: C++ (v142) Universal Windows Platform tools

It’s not listed on the VS installer, and I’ve got the UWP development workload installed; so I have no idea what’s actually going on.

EDIT: actually it is under the optional tab of the UWP development workload on the right-hand side; totally missed that. Will try again with it installed soon.

EDIT 2: It did get rid of the toolset errors but the errors above actually still remain. I think… we can disregard my comments 😅

#449 This should fix it (Thanks @Someguynamedpie)