# include<stdio.h>
int main() {
printf("my name is Lakpa Titung");
return 0;
}
Windows PowerShell Copyright (C) Microsoft Corporation. All rights
reserved.
Install the latest PowerShell for new features and improvements!
https://aka.ms/PSWindows
PS C:\Users\user\C programming> gcc coading.c
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
PS C:\Users\user\C programming> ./a.exe
./a.exe : The term './a.exe' 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
+ ./a.exe
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (./a.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\user\C programming>
1条答案
按热度按时间ruarlubt1#
您的代码是完全正确的,但在编译时它会显示如下错误:Windows PowerShell版权所有(C)Microsoft Corporation。版权所有。
安装最新的PowerShell以获得新功能和改进!https://aka.ms/PSWindows
**然后转到:设置-扩展-运行代码配置-在终端中单击运行,然后在运行前单击保存...
您的设置已完成。重新运行您的代码。