我正在尝试将这一行包含在我的 .c 代码中
#include <Python.h>
我的 helloworld.c 中只有
#include <stdio.h>
#include <Python.h>
int main()
{
printf("Hi, this is me. \n");
system("pause");
return 0;
}
我还没有写任何使用 python.h 的东西,因为我还不能 编译。这是我得到的错误:
fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
我正在使用 CL.exe,visual studio 2017 的命令行编译器来运行它:
cl /LD helloworld.c
如何让编译器知道我的 python.h 在哪里?
最佳答案
cl /LD /I C:\python\include hello.c C:\python\libs\python36.lib
关于python - Visual Studio CL.exe 找不到 python.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50197984/