Question

i wanted to run Python-Scripts with C++.

At my book, there is following:

#include <Python.h>
... at main function some calls

But at compiling the Compiler can't find the Python header file.

How can i fix this?

Was it helpful?

Solution

On Linux Mint sudo apt-get install python-dev should do the job. This will get and install the python development files.

This should put the include files at /usr/include/python2.7/ so you need to add -l /usr/include/python2.7/ to your compiler flags.

`

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top