numpy.distutils.ccompiler.CCompiler_compile

distutils.ccompiler.CCompiler_compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None)[源代码]

编译一个或多个源文件。

有关更多详细信息,请参阅Python distutils API参考。

参数
sourcesstr列表

文件名列表

output_dir可选的STR

输出目录的路径。

macros元组列表

宏定义的列表。

include_dirsstr列表,可选

要添加到默认目录的目录仅包括此编译的文件搜索路径。

debug可选的布尔

是否在对象文件中或旁边输出调试符号。

extra_preargs, extra_postargs是吗?

额外的前置和后置参数。

dependsstr列表,可选

所有目标依赖的文件名列表。

返回
objectsstr列表

对象文件名列表,每个源文件一个 sources .

加薪
CompileError

如果编译失败。