diff --git a/doc/v2/faq.html b/doc/v2/faq.html index 398c8ea0..e78ce612 100644 --- a/doc/v2/faq.html +++ b/doc/v2/faq.html @@ -34,8 +34,12 @@
@@ -150,12 +154,73 @@ void foo(std::vector<double>& array) cvs -d:pserver:anonymous@cvs.cctbx.sourceforge.net:/cvsroot/cctbx login cvs -d:pserver:anonymous@cvs.cctbx.sourceforge.net:/cvsroot/cctbx co scitbx + + +fatal error C1204:Compiler limit:internal + structure overflow
+ ++ Q: I get this error message when compiling a large source + file. What can I do? + ++A: You have two choices:
+ ++
+- Upgrade your compiler (preferred)
+ +- + Break your source file up into multiple translation units. + +
++
my_module.cpp:+... +void more_of_my_module(); +BOOST_PYTHON_MODULE(my_module) +{ + def("foo", foo); + def("bar", bar); + ... + more_of_my_module(); +} ++more_of_my_module.cpp: ++void more_of_my_module() +{ + def("baz", baz); + ... +} ++ If you find that aclass_<...>declaration + can't fit in a single source file without triggering the error, you + can always pass a reference to theclass_object to a + function in another source file, and call some of its member + functions (e.g..def(...)) in the auxilliary source + file:+ +: +more_of_my_class.cpp
+void more_of_my_class(class<my_class>& x) +{ + x + .def("baz", baz) + .add_property("xx", &my_class::get_xx, &my_class::set_xx) + ; + + ... +} ++
Revised - 13 November, 2002 - + 13 November, 2002 +