I have created two files embed.py useEmbed.cppin my home directory.
embed.py
import os
print os.getcwd()
useEmbed.cpp
#include <iostream>
#include "Python.h"
using namespace std;
int main()
{
Py_Initialize();
PyRun_SimpleFile("embed.py");
Py_Finalize();
return 0;
}
Command g++ useEmbed.cpp -o useEmbed returns Python.h not found, What should i do next step to make .cpp file compiled successfully and return the right answer? Thank for tips about how to set environment to make this test OK.
Thank you!
UPDATE: Thanks for tips from David and Alexander. Problem has been solved after install package python-devel in my Fedora Linux.