great, thanks for that lib, also thanks to pro-rsoft, i’ve managed to compile it under snow leopard using the makefile with some adations, maybe they are useful for someone else:
PANDA3D_INCDIR := /Applications/Panda3d/1.7.0/include
PANDA3D_LIBDIR := /Applications/Panda3d/1.7.0/lib
PANDA3D_LIBS := -lpanda
PYTHON_VERSION := python2.5
PYTHON_INCDIR := /usr/include/$(PYTHON_VERSION)
HEADERS := $(wildcard *.h)
OBJS := $(patsubst %.cxx, %.o, $(wildcard *.cxx)) pandaai_igate.o
all: libpandaai.so
pandaai_igate.cxx: $(HEADERS)
interrogate -S$(PANDA3D_INCDIR)/parser-inc -I$(PANDA3D_INCDIR) -oc pandaai_igate.cxx -Dvolatile -Dmutable -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -fnames -string -refcount -assert -python-native -do-module -module libpandaai -library libpandaai $(HEADERS)
%.o: %.cxx
g++ -c -o $@ $< -fPIC -I. -arch i386 -I$(PANDA3D_INCDIR) -I$(PYTHON_INCDIR)
libpandaai.so: $(OBJS)
g++ -shared -o $@ $(OBJS) -arch i386 -L$(PANDA3D_LIBDIR) $(PANDA3D_LIBS) -undefined dynamic_lookup
clean:
rm -f $(OBJS) pandaai_igate.cxx libpandaai.so
test: libpandaai.so
$(PYTHON_VERSION) -c "import libpandaai"
install: libpandaai.so
cp libpandaai.so /usr/local/lib/libpandaai.so
uninstall:
rm /usr/local/lib/libpandaai.so
.PHONY: all test clean install uninstall
i havent yet had the time to really test it.
edit: the “Seek and Flee Egg Demo” works fine