C-Python compilation error
<p>I am trying to embed python in c++. I am not able to compile some c++ code that uses Python.h. I get an error that seems to be the library is not referenced correctly.</p>

<p>Below is the error shown which I received:</p>

<p>/tmp/ccxiQ8eE.o:(.data+0xc4): undefined reference to <code>Py_NoopCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0xd4): undefined reference to</code>Py_FilterPalletteCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0xe4): undefined reference to <code>Py_FilterCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0xf4): undefined reference to</code>Py_CaptureCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0x104): undefined reference to <code>Py_CaptureBufferCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0x114): undefined reference to</code>Py_StreamCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0x1b4): undefined reference to <code>Py_ModelDebugCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0x1c4): undefined reference to</code>Py_ModelVersionCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0x1d4): undefined reference to <code>Py_ModelSimRunCmd(_object*, _object*)'
/tmp/ccxiQ8eE.o:(.data+0x1e4): undefined reference to</code>Py_ModelSimEndCmd(_object*, _object*)'
collect2: error: ld returned 1 exit status
make: *** [xgs_sim.linux] Error 1</p>

<p>For these functions prototype declaration has been done in some other test.h file and that file has been included while compiling in the program.cc file.
The function definition has been done in test.cc file.</p>

<p>Python version used is python 2.7.1.</p>

<p>Any help/guidelines will be much appreciated. Thanks.</p>