Python.h not found
I am trying to embed some C code in Python, and I have a C program that includes Python.h. When I try to compile it it says
"fatal error: Python.h: No such file or directory"
though I have Python.h in /usr/include/python2.7. Anyone know what's wrong?
It depends upon two things. 1) is what include directories you have specified in your makefile with the -I <dir> flag, and 2) is how you specified the include file with the #include <file> directive in your code. If #2 was "#include <python.h>", then you need the flag "-I /usr/include/python2.7" in the CFLAGS section of your makefile.
Then would I have to use make to compile this C program, or run the python program that calls it? Or can I still use gcc/python. And can you tell me where makefile is?
You need to build the C code first. As for the makefile for your C code, that depends. Usually it is created dynamically by either a configure script (autoconf), or a set of cmake rules. These are two common methods used to interrogate the operating system for installed software to see what it is capable of, creating the appropriate Makefile with the flags needed to build the tool in question. So what is this program that you are trying to get to work with Python?