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?

有帮助吗?

解决方案

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.

`

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top