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 参考。
- 参数:
- sources字符串列表
文件名列表
- output_dirstr,可选
输出目录的路径。
- macros元组列表
宏定义列表。
- include_dirsstr 列表,可选
仅针对此编译添加到默认包含文件搜索路径的目录。
- debugbool,可选
是否在目标文件内或其旁边输出调试符号。
- extra_preargs, extra_postargs?
额外的预参数和后参数。
- dependsstr 列表,可选
所有目标都依赖的文件名列表。
- 返回:
- objectsstr 列表
对象文件名列表,每个源文件 sources 对应一个。
- 引发:
- CompileError
如果编译失败。