C Linking Error: undefined reference to 'main'

前端 未结 4 1578
走了就别回头了
走了就别回头了 2021-02-06 22:50

I have read the other answers on this topic, and unfortunately they have not helped me. I am attempting to link several c programs together, and I am getting an error in respons

4条回答
  •  别那么骄傲
    2021-02-06 23:27

    You should provide output file name after -o option. In your case runexp.o is treated as output file name, not input object file and thus your main function is undefined.

提交回复
热议问题