簡體   English   中英

LLC Compiler 未被識別為 cmdlet、function、腳本文件或可運行程序的名稱

[英]LLC Compiler is not recognized as the name of a cmdlet, function, script file, or operable program

我使用 python 創建自定義編程語言,PLY 作為詞法分析器和解析器,LLVMlite 作為低級中間語言來進行代碼生成。 我已經使用 Python pip 安裝了 PLY 和 LLC

我使用LLC創建一個object文件output.o和GCC創建最終的可執行文件如下。

$ llc -filetype=obj output.ll
$ gcc output.o -o output

當我執行llc -filetype=obj output.ll我得到

llc : The term 'llc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,  
verify that the path is correct and try again.
At line:1 char:1
+ llc -filetype=obj output.ll
    + CategoryInfo          : ObjectNotFound: (llc:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我已經花了幾個小時在這上,但無法弄清楚。 怎么了?

PyPi package llc與 LLVM 的llc工具無關。 您不能通過pip安裝后者,因為它不是 Python package。 您需要安裝 LLVM 工具才能獲得它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM