gpt4 book ai didi

c - 模块 c0.ASM 中 undefined symbol _main

转载 作者:行者123 更新时间:2023-11-30 17:26:34 25 4
gpt4 key购买 nike

该程序已成功编译,但出现以下链接错误:

模块 c0.ASM 中 undefined symbol _main

我的程序如下:

#include<stdio.h>
#include<conio.h>

int main()
{
char input[] = "hello sumit kumar";
char *a;
a = input;
printf("%s", a);
getch();
return 0;
}

`

最佳答案

假设您使用的是 Linux:以下程序可以运行。

#include<stdio.h>

int main()
{
char input[] = "hello sumit kumar"; //Removed stray marks at the beginning
char *a;
a = input;
printf("%s", a);
getchar(); //To use getch() have to include <curses.h> file
return 0; //Removed stray marks at the end
}

关于c - 模块 c0.ASM 中 undefined symbol _main,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26728897/

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