pacha
May 5, 2013, 6:17am
1
I am using Ubuntu, I installed Panda3D 1.9 from the repo and I am using eclipse with the following include/library configuration:
i.imgur.com/ciwzERP.png
i.imgur.com/TES4hVN.png
I got the following errors while compiling:
Does someboy know how to fix this? Thanks.
03:08:35 **** Incremental Build of configuration Release for project panda3dplayground ****
make all
Building target: panda3dplayground
Invoking: Cross G++ Linker
g++ -L/usr/lib/panda3d -o “panda3dplayground” ./main.o -lp3pystub -lp3framework -lpandafx -lp3pystub -lpandaexpress -lpanda -lp3framework -lp3direct
/usr/lib/panda3d/libpanda.so: undefined reference to PyObject_Cmp' /usr/lib/panda3d/libpanda.so: undefined reference to
PyUnicodeUCS4_FromWideChar’
/usr/lib/panda3d/libpanda.so: undefined reference to PyDict_SetItem' /usr/lib/panda3d/libpanda.so: undefined reference to
PyExc_ValueError’
/usr/lib/panda3d/libpanda.so: undefined reference to PyDict_SetItemString' /usr/lib/panda3d/libpanda.so: undefined reference to
PyType_IsSubtype’
/usr/lib/panda3d/libpanda.so: undefined reference to PyString_FromString' /usr/lib/panda3d/libpanda.so: undefined reference to
PyErr_Fetch’
/usr/lib/panda3d/libpanda.so: undefined reference to PyExc_StandardError' /usr/lib/panda3d/libpanda.so: undefined reference to
PyInt_AsSsize_t’
/usr/lib/panda3d/libpanda.so: undefined reference to PyArg_Parse' /usr/lib/panda3d/libpanda.so: undefined reference to
PyEval_RestoreThread’
/usr/lib/panda3d/libpandaexpress.so: undefined reference to PyString_AsStringAndSize' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_CallFunction’
/usr/lib/panda3d/libpanda.so: undefined reference to PyDict_Size' /usr/lib/panda3d/libpanda.so: undefined reference to
PyString_Size’
/usr/lib/panda3d/libpanda.so: undefined reference to PyErr_Print' /usr/lib/panda3d/libpanda.so: undefined reference to
PyErr_SetString’
/usr/lib/panda3d/libpanda.so: undefined reference to PyGILState_Ensure' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_CallObject’
/usr/lib/panda3d/libpanda.so: undefined reference to PyString_FromStringAndSize' /usr/lib/panda3d/libp3dtool.so: undefined reference to
PySys_GetObject’
/usr/lib/panda3d/libp3dtool.so: undefined reference to PyList_GetItem' /usr/lib/panda3d/libpanda.so: undefined reference to
PyExc_AssertionError’
/usr/lib/panda3d/libp3dtoolconfig.so: undefined reference to Py_InitModule4_64' /usr/lib/panda3d/libpanda.so: undefined reference to
PyModule_AddStringConstant’
/usr/lib/panda3d/libpanda.so: undefined reference to PyGen_Type' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_Compare’
/usr/lib/panda3d/libpanda.so: undefined reference to PyList_Append' /usr/lib/panda3d/libpanda.so: undefined reference to
PyMapping_GetItemString’
/usr/lib/panda3d/libp3dtoolconfig.so: undefined reference to PyArg_ParseTuple' /usr/lib/panda3d/libpanda.so: undefined reference to
PyTuple_Pack’
/usr/lib/panda3d/libpanda.so: undefined reference to PyLong_FromUnsignedLongLong' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_Repr’
/usr/lib/panda3d/libpanda.so: undefined reference to PyInt_FromLong' /usr/lib/panda3d/libpanda.so: undefined reference to
PyArg_ParseTupleAndKeywords’
/usr/lib/panda3d/libpanda.so: undefined reference to _Py_NoneStruct' /usr/lib/panda3d/libpanda.so: undefined reference to
PyList_SetItem’
/usr/lib/panda3d/libpanda.so: undefined reference to PyCallable_Check' /usr/lib/panda3d/libpanda.so: undefined reference to
PyErr_Clear’
/usr/lib/panda3d/libpanda.so: undefined reference to PyLong_AsUnsignedLongLong' /usr/lib/panda3d/libpanda.so: undefined reference to
PyErr_ExceptionMatches’
/usr/lib/panda3d/libpanda.so: undefined reference to PyDict_New' /usr/lib/panda3d/libpanda.so: undefined reference to
PyUnicodeUCS4_AsWideChar’
/usr/lib/panda3d/libpanda.so: undefined reference to PyInt_AsLong' /usr/lib/panda3d/libpanda.so: undefined reference to
PyUnicodeUCS4_GetSize’
/usr/lib/panda3d/libpanda.so: undefined reference to PyObject_RichCompareBool' /usr/lib/panda3d/libpanda.so: undefined reference to
PyModule_AddObject’
/usr/lib/panda3d/libpanda.so: undefined reference to PyGILState_Release' /usr/lib/panda3d/libpanda.so: undefined reference to
PySequence_GetItem’
/usr/lib/panda3d/libpanda.so: undefined reference to PyLong_AsUnsignedLong' /usr/lib/panda3d/libpanda.so: undefined reference to
_Py_NotImplementedStruct’
/usr/lib/panda3d/libpanda.so: undefined reference to PySequence_Size' /usr/lib/panda3d/libpanda.so: undefined reference to
PyExc_TypeError’
/usr/lib/panda3d/libpanda.so: undefined reference to PyNumber_Long' /usr/lib/panda3d/libpanda.so: undefined reference to
Py_BuildValue’
/usr/lib/panda3d/libpanda.so: undefined reference to PyEval_InitThreads' /usr/lib/panda3d/libpanda.so: undefined reference to
PyType_Ready’
/usr/lib/panda3d/libpanda.so: undefined reference to PyFloat_FromDouble' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_GenericSetAttr’
/usr/lib/panda3d/libpanda.so: undefined reference to PyObject_IsTrue' /usr/lib/panda3d/libpanda.so: undefined reference to
PyImport_GetModuleDict’
/usr/lib/panda3d/libpanda.so: undefined reference to PyObject_Free' /usr/lib/panda3d/libpanda.so: undefined reference to
PyNumber_Float’
/usr/lib/panda3d/libpanda.so: undefined reference to PyBool_FromLong' /usr/lib/panda3d/libp3dtoolconfig.so: undefined reference to
PyLong_AsLong’
/usr/lib/panda3d/libpanda.so: undefined reference to PyExc_IndexError' /usr/lib/panda3d/libpanda.so: undefined reference to
PyLong_AsLongLong’
/usr/lib/panda3d/libpandaexpress.so: undefined reference to PyLong_FromLongLong' /usr/lib/panda3d/libpanda.so: undefined reference to
PyFloat_AsDouble’
/usr/lib/panda3d/libpanda.so: undefined reference to PyEval_SaveThread' /usr/lib/panda3d/libpanda.so: undefined reference to
PyErr_Restore’
/usr/lib/panda3d/libpanda.so: undefined reference to PyErr_WarnEx' /usr/lib/panda3d/libpanda.so: undefined reference to
PyString_Type’
/usr/lib/panda3d/libpanda.so: undefined reference to PyExc_StopIteration' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_Type’
/usr/lib/panda3d/libpanda.so: undefined reference to PyObject_Call' /usr/lib/panda3d/libpanda.so: undefined reference to
PySequence_Check’
/usr/lib/panda3d/libpanda.so: undefined reference to PyType_GenericAlloc' /usr/lib/panda3d/libpanda.so: undefined reference to
PyString_AsString’
/usr/lib/panda3d/libpanda.so: undefined reference to PyModule_AddIntConstant' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_CallMethod’
/usr/lib/panda3d/libp3dtool.so: undefined reference to Py_IsInitialized' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_GetAttrString’
/usr/lib/panda3d/libpanda.so: undefined reference to PyList_New' /usr/lib/panda3d/libpanda.so: undefined reference to
PyExc_SystemExit’
/usr/lib/panda3d/libpanda.so: undefined reference to PyDict_GetItem' /usr/lib/panda3d/libpanda.so: undefined reference to
PyExc_FutureWarning’
/usr/lib/panda3d/libpanda.so: undefined reference to PyTuple_New' /usr/lib/panda3d/libpanda.so: undefined reference to
PyErr_Format’
/usr/lib/panda3d/libpanda.so: undefined reference to PyCFunction_NewEx' /usr/lib/panda3d/libp3dtoolconfig.so: undefined reference to
PyLong_FromUnsignedLong’
/usr/lib/panda3d/libpanda.so: undefined reference to PyExc_AttributeError' /usr/lib/panda3d/libpanda.so: undefined reference to
PyObject_GenericGetAttr’
/usr/lib/panda3d/libpanda.so: undefined reference to PyTuple_Size' /usr/lib/panda3d/libpanda.so: undefined reference to
PySequence_Fast’
/usr/lib/panda3d/libpanda.so: undefined reference to PyErr_Occurred' /usr/lib/panda3d/libpanda.so: undefined reference to
PySequence_Tuple’
/usr/lib/panda3d/libpanda.so: undefined reference to `PyDict_DelItemString’
collect2: error: ld returned 1 exit status
make: *** [panda3dplayground] Error 1
03:08:35 Build Finished (took 402ms)
rdb
May 5, 2013, 9:24am
2
Hmm, that’s strange, p3pystub is supposed to contain these symbols. Hmm, sometimes the linker is strict about the order of libraries, perhaps you should move the p3pystub option to the end of the command or so?
If that doesn’t work, does “nm” of the p3pystub library show that these symbols exist?
Could you try linking with -lpython2.7 (or whatever version your distro uses) instead of -lp3pystub to see if that would work?
pacha
May 5, 2013, 10:22am
3
rdb:
Hmm, that’s strange, p3pystub is supposed to contain these symbols. Hmm, sometimes the linker is strict about the order of libraries, perhaps you should move the p3pystub option to the end of the command or so?
If that doesn’t work, does “nm” of the p3pystub library show that these symbols exist?
Could you try linking with -lpython2.7 (or whatever version your distro uses) instead of -lp3pystub to see if that would work?
Moving p3pystub to the bottom made it work, thanks.
Although I fixed it before adding python2.7 at the bottom.
rdb
May 5, 2013, 9:35pm
4
Good to know. For the record, you should never link both p3pystub and python2.7; if you don’t need Python, you should use the former, otherwise you should use the latter.