Undefined reference to main - collect2: ld returned 1 exit status

后端 未结 7 2181
栀梦
栀梦 2020-12-07 22:43

I\'m trying to compile a program (called es3), but, when I write from terminal:

gcc es3.c -o es3

it appears this message:

/usr/l         


        
7条回答
  •  Happy的楠姐
    2020-12-07 23:08

    You can just add a main function to resolve this problem. Just like:

    int main()
    {
        return 0;
    }
    

提交回复
热议问题