Ah sorry, I just found that my thread is a duplicate of:
… and I found that the following change is enough for compiling successfully:
//#include <filesystem>
#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <experimental/filesystem>
1 Like