Py_Initialize(); undefined reference...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Markus Heller

    #1

    Py_Initialize(); undefined reference...

    Dear Gurus,

    I want to embed python into C++ and I have followed the documentation as
    given here:
    This manual documents the API used by C and C++ programmers who want to write extension modules or embed Python. It is a companion to Extending and Embedding the Python Interpreter, which describes...

    I have stated an include to "Python.h" and now I want to initialize the
    Python framework. My compiler though says that the call to the function
    Py_Initialize() is an undefined reference.

    My question to you: How can I change it so that the compiler sees that the
    function call is defined?

    Thanks in advance,
    Markus
  • Markus Heller

    #2
    Re: Py_Initialize() ; undefined reference...

    > I want to embed python into C++ and I have followed the documentation as[color=blue]
    > given here:
    > http://docs.python.org/api/
    > I have stated an include to "Python.h" and now I want to initialize the
    > Python framework. My compiler though says that the call to the function
    > Py_Initialize() is an undefined reference.
    >
    > My question to you: How can I change it so that the compiler sees that the
    > function call is defined?[/color]

    Hi guys,

    no need to reply, I solved it. This issue is simply due to a linker
    statement... I need to link the according python2.3 lib and that's it.

    Best wishes,
    Markus

    Comment

    Working...