I'm trying to get Pybind 11 to work and am struggling. I tried to compile my .cpp file using this:
c++ -Wall -std=c++11 -fPIC `python3 -m --includes` -I ~/Documents/Single_electron/pybind11/include single_e.cpp -o single_e `python-config --includes`
But get a whole host of errors, starting with this list:
single_e.cpp :(.text+0xaa): undefined reference to `Py_GetVersion'
single_e.cpp :(.text+0x104): undefined reference to `PyExc_ImportError'
single_e.cpp :(.text+0x123): undefined reference to `PyErr_Format'
single_e.cpp :(.text+0x1b2): undefined reference to `PyExc_ImportError'
single_e.cpp :(.text+0x1c0): undefined reference to `PyErr_SetString'
single_e.cpp :(.text+0x1f9): undefined reference to `PyExc_ImportError'
single_e.cpp :(.text+0x207): undefined reference to `PyErr_SetString'
Has anyone got any suggestions about how I should fix this?