This is my first contribution to the forum. I am developing some plugins just for my own use under Windows and up to now I did not run into any severe problems, thanks to the superb tutorials.
Yesterday I updated Visual Studio 2022 to version 17.3.6. Since then the C++ editor shows lots of errors, not only in my own code, but also in the JUCE module sources. The include mechanism seems to fail completely. While the editor is almost unusable, the builds work flawlessly.
I also tried the following:
A completely new Visual Studio 2022 export from the Projucer → Same error
An export to an older Visual Studio 2019 version → Editor and build show no errors.
Yes. The guys at Microsoft have somehow broken their support for unity builds even more, so now it breaks Intellisense in VS, as it’s been for some time in VS Code. I’ve moved from Projucer to CMake for this reason -there are still errors, but they’re more tolerable. This is something Microsoft has to fix, though they don’t seem very worried about it.
Thanks for the hint.
This does indeed remove the unjustified error messages from the error list.
But the source code editor still marks non local identifiers as “undefined” and navigating to the declaration does not work.
This issue will be fixed by adding explicit includes to the JUCE modules (without changing the unity build format).
We’ve discussed that here:
And I’ve also attached an example on how to do that in the juce_osc module. This would have the advantage of also fixing intellisense in VS Code and other text editors that can’t parse through the build system.
Would be great if this (non breaking!) change could be applied. It’s slightly tedious work but shouldn’t take more than a few hours for the entire library.
One additional comment: Apparently there is no way to go back to a prior version of the Community edition of Visual Studio 2022. So for the time being I have to stay with my outdated Visual Studio 2019 version,
Just to highlight this, I think that it is a common use-case to develop custom juce-modules, especially when there are multiple plugins that share some common functionality.
I’d therefore vote for higher priority for fixing these code-completion issues!
I believe @drks is saying that once he has installed version 17.3.6 of VS 2022 (where apparently this issue surfaced), he is not able to revert to a previous version of VS 2022 (for example, 17.3.5 or whatever version was current before 17.3.6), where the issue was not present.