I think I figured it out that when build python on Linux, we need to
On Mon, Feb 19, 2018 at 5:04 PM, Chris Angelico <ros...@gmail.com> wrote:
> On Tue, Feb 20, 2018 at 8:07 AM, Jason Qian via Python-list
> <firstname.lastname@example.org> wrote:
> > Hi,
> > I am calling python from a c application.
> > It compiles and works fine on the windows. How do I compile and
> > 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
> > 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
> By "calling Python from C", do you mean what the docs call "embedding"?
> I would recommend following the tutorial there, if you haven't
> already. If you have, and the tutorial code doesn't work for you, post
> your code and what you did, and we'll try to help with that.