質問

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