diff --git a/otfmi/function_exporter.py b/otfmi/function_exporter.py index 9ba2d93..7e03e24 100644 --- a/otfmi/function_exporter.py +++ b/otfmi/function_exporter.py @@ -383,6 +383,8 @@ def _write_cwrapper_cxx(self): #include #include #include +#include + using namespace OT; const char xml_data[] = { {{ xml_data_bin }} }; @@ -398,7 +400,7 @@ def _write_cwrapper_cxx(self): if (!function.getEvaluation().getImplementation()->isActualImplementation()) { Study study; - const String fileName = Path::BuildTemporaryFileName("function.xml"); + const String fileName = (std::filesystem::temp_directory_path() / "function.xml").string(); std::ofstream xmlFile(fileName, std::ios::out | std::ios::binary); if (xmlFile.good()) {