diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 564fb41420..d8b1331efd 100755 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -1148,7 +1148,7 @@ write_module_support(ostream &out, ostream *out_h, InterrogateModuleDef *def) { out << " {NULL, NULL, 0, NULL}\n" << "};\n\n"; - out << "struct LibraryDef " << def->library_name << "_moddef = {python_simple_funcs, BuildInstants};\n"; + out << "EXPORT_THIS struct LibraryDef " << def->library_name << "_moddef = {python_simple_funcs, BuildInstants};\n"; if (out_h != NULL) { *out_h << "extern struct LibraryDef " << def->library_name << "_moddef;\n"; } diff --git a/dtool/src/interrogate/interrogate_module.cxx b/dtool/src/interrogate/interrogate_module.cxx index 9292f04b02..fb25057007 100644 --- a/dtool/src/interrogate/interrogate_module.cxx +++ b/dtool/src/interrogate/interrogate_module.cxx @@ -112,7 +112,7 @@ int write_python_table_native(ostream &out) { pset::iterator ii; for(ii = libraries.begin(); ii != libraries.end(); ii++) { printf("Referencing Library %s\n", (*ii).c_str()); - out << "extern LibraryDef " << *ii << "_moddef;\n"; + out << "IMPORT_THIS LibraryDef " << *ii << "_moddef;\n"; } out << "\n"