문제

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