gpt4 book ai didi

unable to compile x86 .s file(无法编译x86.s文件)

转载 作者:bug小助手 更新时间:2023-10-28 20:52:53 24 4
gpt4 key购买 nike



I tried compiling my asm .s file in the terminal of VSC and it didn't work although it worked just yesterday :(

我试着在VSC的终端中编译我的ASM.s文件,但它不起作用,尽管它昨天才起作用:(


The code:

代码:


.global main

main:
pushq %rbp
movq %rsp, %rbp

movq %rbp, %rsp
popq %rbp

end:
movq $0, %rdi
call exit

What I entered in terminal:

我在终端中输入的内容:


PS C:\Users\runan\Desktop\x86> gcc -no-pie -o power power.s

The error message I got:

我收到的错误消息是:


gcc : The term 'gcc' 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
+ gcc -no-pie -o power power.s
+ ~~~
+ CategoryInfo : ObjectNotFound: (gcc:String) [], Comman
dNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

I checked and the file is in the folder. I tried set Path= ... command and then gcc -v but it didn't work either.

我查过了,文件在文件夹里。我试着设置PATH=...司令部,然后是GCC-v,但它也没有奏效。


更多回答

You need to run this command from the WSL shell, not the Powershell.

您需要从WSL外壳而不是Power外壳运行该命令。

优秀答案推荐
更多回答

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com