Python程序中的C源文件应该放在哪里?

2024-10-04 05:21:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图编译一个Python程序,其中包含一些C文件。你知道吗

在一个文件emodule.c中,它读取:

#include "Python.h"
#include "ul/ul.h"

我已经有了ul文件夹,并将它与emodule.c放在同一个文件夹中,但是,当我运行python setup.py build时,它仍然显示:

fatal error: ul/ul.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

我应该把ul文件夹放在哪里?你知道吗


Tags: or文件nopybuild程序文件夹include