Error building pluginval; missing chrono_literals

I am trying to build pluginval on Visual Studio 2022, Windows 10. I am getting errors for missing “chrono literals” (like the ‘ms’ in 100ms).

…which comes down to things like, in BasicTests.cpp, line 726:

            using namespace std::literals;
            std::this_thread::sleep_for (100ms);

I checked and the projects’ C++ Language Standard seem to be all set to ‘ISO C++14 Standard (/std:c++14)’ or higher.

For the record, I used git to clone pluginval, then used these commands to make the VS solution:

git checkout v1.0.4

git submodule update --init --recursive

cmake -G "Visual Studio 17 2022" -S . -B Builds/Debug -DCMAKE_BUILD_TYPE=Debug

Any suggestions on how to fix this? Thanks!

I think that was a bug in VS 2022 or at least it didn’t include the chrono headers transitively like the other platforms.

I’m fairly sure that was fixed on the develop branch so maybe try that first. git checkout develop.

But really, VS 2022 is pretty old now. Is there a reason you’re on that version? 24 or 26 are better choices. For reference, the pluginval CI runs – Building for: Visual Studio 18 2026

Thank you. I checked out the develop and it indeed fixed that problem. It all compiles with 0 errors and 0 warnings.

As for why I’m still using VS 2022, I’m one of the poor misguided backwards fools using the Projucer to manage my projects. And it does not have export for 2024 or 2026.

I’m 6 years into developing a project and I’ve always used Projucer, and I’m very hesitant to mess with my flow as it all works good for me.

My Projucer has exporters for VS 2019, VS 2022, and VS 2026. When you download JUCE, you need to go to the “Extras” folder and build Projucer for your computer. Then you will have the other exporters.

1 Like

Really? Thank you, I will look into that. I don’t know why they wouldn’t ship the Projucer with the 2026 export option enabled. I only have macOS, VS 2019 and VS 2022. I am running 8.0.10 but I plan to move to 8.0.13 next week.

Perhaps you just need to click on the “+” symbol in the bottom right corner of the “Exporters” section in Projucer. That will produce a menu with exporter choices.

Did you rebuild Projucer?

Actually, it appears you are using and old version. Maybe try clearing out your JUCE folder. Re-download JUCE. Build Projucer from the “Extras” folder. You definitely should have VS 2026 as an export option.

1 Like

It says it’s the Projucer from 8.0.10.

But thanks for this info. I’ll rebuild it and make sure I have the 2026 export option when I update to 8.0.13 next week. I don’t actually need it at this moment - but I’m happy to find out it exists.

You don’t need an exporter nowadays. AI does a decent job in reading the projucer file and exporting it to a Cmakelists.txt. You will only need to review it and make a few tweaks. PS. I’ve exported already 3 JUCE7 projects like this and can do it for you for peanuts if you don’t want to bother :slight_smile: