From: Peter E. <pea...@st...> - 2014-03-20 20:42:57
|
I finally figured this out. The real problem, it turned out, is that when you %import a module, it _only_ looks at the contents of the one file you specify. It does _not_ follow #include or %include commands contained in that file. That caused everything I tried to fail in one way or another. When I tried to %import my top level header flle (OpenMM.h), it didn't find the parent class because it didn't follow the #include in that file to import Force.h. When I only imported Force.h it still didn't work because the class declaration began class OPENMM_EXPORT Force { and OPENMM_EXPORT was #defined in a separate header file that it didn't look at. And when I tried to import my SWIG module (OpenMM.i), that still didn't work because the module definition was split between that file and several others that were %included in it. The only way to make this work, it appears, is to have your _entire_ module definition in just one single file. Peter |