genpycode

ok, i’ve gotten to the point where i want to create the python interface. i hit this error with genpycode, and I’m not sure what I need to do to fix this…

jsmith2@perdita:~/panda3d/direct$ genPyCode
:11-23-2004 21:38:21 FFI(warning): Importing code library: libpandaexpress
:11-23-2004 21:38:23 FFI(warning): Importing code library: libpanda
:11-23-2004 21:38:48 FFI(warning): Importing code library: libpandaphysics
:11-23-2004 21:38:58 FFI(warning): Importing code library: libdirect
Traceback (most recent call last):
File “/usr/local/panda/bin/genPyCode.py”, line 20, in ?
DoGenPyCode.run()
File “/usr/local/panda/lib/direct/ffi/DoGenPyCode.py”, line 183, in run
db.generateCode(outputDir, extensionsDir)
File “/usr/local/panda/lib/direct/ffi/FFIInterrogateDatabase.py”, line 722, in generateCode
self.generateCodeLib(codeDir, extensionsDir, CModuleName)
File “/usr/local/panda/lib/direct/ffi/FFIInterrogateDatabase.py”, line 776, in generateCodeLib
exec('import ’ + CModuleName)
File “”, line 1, in ?
ImportError: /usr/local/panda/lib/libshowbase.so: undefined symbol: get_category__33NotifyCategoryGetCategory_display

Your Linux system seems to be fussier than mine about transitive linking. NotifyCategory_display is defined in libdisplay.so, which is linked by libpanda.so, which is linked by libshowbase.so. But your system seems unable to resolve the transitive linking. (I’ve seen Irix have this problem, but so far I’ve never had the problem on Linux machines before.)

Try adding display:c to the OTHER_LIBS list in direct/src/showbase/Sources.pp. Then ppremake, make clean-showbase, make install. This will force it to add -ldisplay to the link line for libshowbase.so.

On the OTHER_LIBS line, panda:m names libpanda.so as a metalib, while display:c names libdisplay.so as a component lib. Component libs are only linked explicitly on Unix-based systems; Windows-based systems link only with the metalibs–thus we have to make the distinction with the suffix letter.

David

fussy indeed. genpycode worked, i can now create basic panda worlds. thanks!