VS 2017 - could not create a named generator Visual Studio
My VS 2019 doesn't seem able to open/create C++ projects at all (not a MuseScore problem, trying to solve separately) so I've tried VS 2017. It opens the folder fine but I get
Error CMake Error: Could not create named generator Visual Studio 16 2019 Win64
in the "Error List" tab.
Which doesn't make much sense as I'm using VS 2017...there are some hits online for that error but they don't seem to be helping much.
I tried changing the references to VS 16 2019 in various files to VS 15 2017 and now I get an error on "cmake_minimum_required(VERSION 3.16)".
So it seems the current source does in fact no longer build under VS 2017?
In reply to I tried changing the… by Dylan Nicholson1
That might very well be true; nobody on the core team has been using 2017 in over a year, so it is likely that the build is not compatible with it.
In reply to That might very well be true… by jeetee
... any longer. That new 'Unity' build comes to mind here, for needing a newer cmake
In reply to ... any longer by Jojo-Schmitz
Thanks, solved my 2019 issue by using the Repair function, though getting Qt errors now, but will plough on...
If we have have multiple source files in src directory then in that case what parameter should we pass in the add_executables command ?
In reply to If we have have multiple… by riadbouzit10
I truly hope you're not trying to build the current sources with VS 2017. As mentioned above, that is simply not supported.
And even when building our sources you normally shouldn't be making this type of change to the cmakelists. Anyhow, check the cmake documentation:
add_executable(no s) likely needs a target name and as such has no direct relation on which source files you have.
In reply to I truly hope you're not… by jeetee
Not any longer, maybe. It sure was at a time
In reply to Not any longer, maybe. It… by Jojo-Schmitz
"current" is the hint here ;-)
In reply to "current" is the hint here ;… by jeetee
Are you sure VS 2019 is mandatory meanwhile?
In reply to Are you sure VS 2019 is… by Jojo-Schmitz
I think you might still get the build to work with 2017 as well, but you'll have to put in additional effort to update part of their default toolchain (such as cmake) to actually make it work.