diff --git a/paddle/fluid/pybind/op_function_generator.cc b/paddle/fluid/pybind/op_function_generator.cc index 7eeadac7cef2ed30a90069b8a9d84d65b915545e..f659a671c3947a6e9b619aa264b10284130ff59a 100644 --- a/paddle/fluid/pybind/op_function_generator.cc +++ b/paddle/fluid/pybind/op_function_generator.cc @@ -553,6 +553,11 @@ int main(int argc, char* argv[]) { std::ofstream out(path + "op_function" + std::to_string(i + 1) + ".cc.tmp", std::ios::out); + out << "#if defined(_MSC_VER)\n" + << "#include \n" + << "typedef SSIZE_T ssize_t;\n" + << "#endif\n"; + for (auto& header : headers) { out << "#include " + header + "\n"; }