(yet another) Linking problem


can somebody please help me figure out how to compile this sample?

#include "pandaFramework.h"
#include "pandaSystem.h"

int main(int argc, char *argv[]) {
    PandaFramework framework;
    framework.open_framework(argc, argv);
    framework.set_window_title("My Panda3D Window");
    WindowFramework *window = framework.open_window();


    return (0);

(It’s the very first sample in the manual.)

I’m using Panda 1.8 on Ubuntu 12.04 and g++ via NetBeans.

I have set the Include and Lib directories:


and am linking what I think are the right files:



But when I try to compile this, I get a lot of these errors:

/usr/lib/panda3d/libpanda.so: undefined reference to PyObject_Cmp' /usr/lib/panda3d/libpanda.so: undefined reference toPyUnicodeUCS4_FromWideChar’

PyDict_SetItem',PyExc_ValueError’, PyDict_SetItemString',PyType_IsSubtype’, PyString_FromString',PyErr_Fetch’

and so on.

It looks like I need to link a python library but I don’t know which one or where to find it :frowning:

Hope somebody can explain this to me. Thank you very much in advance!


You need to link to Python by also adding -lpython2.7 to the command line.