How to link to python 3.6.4 library on linux ?

Jason Qian jqian at tibco.com
Mon Feb 19 16:07:02 EST 2018


 Hi,

      I am calling python from a  c application.
      It compiles and works fine on the windows. How do I compile and link
it on the linux for Python 3.6.4  ?

      Under python dir, it only have a static library,

       /opt/Python-3.6.4*/lib*/*libpython3.6m.a*

*     If I link to it, I got:*

*/opt/Python-3.6.4/lib/libpython3.6m.a(abstract.o): relocation R_X86_64_32S
against `_Py_NotImplementedStruct' can not be used when making a shared
object; recompile with -fPIC*
*/opt/Python-3.6.4/lib/libpython3.6m.a: could not read symbols: Bad value*


*Thanks for the help,*



More information about the Python-list mailing list