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)[source]#
編譯一個或多個原始碼檔案。
請參閱 Python distutils API 參考文件以取得更多詳細資訊。
- 參數:
- sources字串列表
檔案名稱列表
- output_dir字串,選填
輸出目錄的路徑。
- macros元組列表
巨集定義列表。
- include_dirs字串列表,選填
僅針對此次編譯,要加入預設 include 檔案搜尋路徑的目錄。
- debug布林值,選填
是否要在物件檔中或旁邊輸出除錯符號。
- extra_preargs、extra_postargs?
額外的 pre- 和 post- 參數。
- depends字串列表,選填
所有目標所依賴的檔案名稱列表。
- 回傳值:
- objects字串列表
物件檔名列表,每個原始碼檔案 sources 對應一個。
- 拋出:
- CompileError
如果編譯失敗。