diff --git a/wrap/Module.cpp b/wrap/Module.cpp index a31f57e79..79fb36c3b 100644 --- a/wrap/Module.cpp +++ b/wrap/Module.cpp @@ -507,6 +507,10 @@ void Module::matlab_code(const string& toolboxPath, const string& headerPath) co } // Generate includes while avoiding redundant includes + if (hasSerialiable) { + wrapperFile.oss << "#include \n"; + wrapperFile.oss << "#include \n\n"; + } generateIncludes(wrapperFile); // create typedef classes - we put this at the top of the wrap file so that collectors and method arguments can use these typedefs diff --git a/wrap/tests/expected/geometry_wrapper.cpp b/wrap/tests/expected/geometry_wrapper.cpp index e00004d57..e62806ef5 100644 --- a/wrap/tests/expected/geometry_wrapper.cpp +++ b/wrap/tests/expected/geometry_wrapper.cpp @@ -6,6 +6,9 @@ #include #include +#include +#include + #include