Cannot find entry symbol _start

后端 未结 2 506
广开言路
广开言路 2021-02-13 15:27

My c code on compiling on gcc is giving the error Cannot find entry symbol _start defaulting to 00000. Can anyone tell me why and how to correct it?

The com

2条回答
  •  终归单人心
    2021-02-13 15:56

    The only reason the compiler threw the above error is because the start code(_start function) generated by the OS for running your code cannot find the default or registered function main. So either you can use _start function instead of main function but the compilation command should be gcc -nostartfiles filename.c but using _start there are a lot of exceptions so better to use main instead.

提交回复
热议问题