Building code outside source dir: undefined symbol: Dtool_Ga

Thanks, that did it (almost): I removed the -python' switch from theinterrogate’ command and added -python-native' to theinterrogate_module’ command.
I also had to change the library name from libPhisheyeLens to phisheyeLens so it matched the name of the output file from the compilation command (before that, I got an error saying “dynamic module does not define init function (initphisheyeLens)”).

Now I can compile and import PhisheyeLens', and even use it instead ofFisheyeLens’ in the example code found in this thread. I’m getting a warning, though, wenn `PhisheyeLens’ is imported: “Class PhisheyeLens has a zero TypeHandle value; check that init_type() is called.” Is that something I should worry about?

For reference: this is how I generate the code and compile the module.

  interrogate -DCPPPARSER -Dvolatile= -D__cplusplus -S/usr/include/panda3d/parser-inc/ -I/usr/include/panda3d/ -oc phisheyeLens_igate.cxx -od phisheyeLens.in -fnames -string -refcount -assert -python-native phisheyeLens.h -module phisheyeLens -library phisheyeLens

interrogate_module -oc phisheyeLens_module.cxx -module phisheyeLens -library phisheyeLens -python-native phisheyeLens.in

g++ phisheyeLens.cxx phisheyeLens_igate.cxx phisheyeLens_module.cxx -Wall -fPIC -shared -o phisheyeLens.so -I/usr/include/eigen3 -I/usr/include/panda3d/ -I/usr/include/python2.7/ -L/usr/lib64/panda3d /usr/lib64/panda3d/libp3dtool.so /usr/lib64/panda3d/libp3direct.so /usr/lib64/panda3d/libp3dtoolconfig.so /usr/lib64/panda3d/libp3framework.so /usr/lib64/panda3d/libp3pystub.so /usr/lib64/panda3d/libpanda.so /usr/lib64/panda3d/libpandaexpress.so /usr/lib64/panda3d/libpandafx.so /usr/lib64/panda3d/libpandaskel.so -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct -lpandaskel