如何让其他的功能比用C main()的其他入口点 [英] How to make other function as entry point other than main() in C
本文介绍了如何让其他的功能比用C main()的其他入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每个程序都有一个的main()
和执行程序从那里开始。是否有可能不写程序的main()
并进行其他功能为切入点?如果是这样,任何一个可以告诉我这怎么办呢?我使用Linux呢?
Each program has a main()
and the program execution starts from there. Is it possible to write a program without main()
and make another function as the entry point? If so, can any one please tell me how can that be done? I am using Linux?
推荐答案
如果你正在用gcc编译,指定 -e<符号GT;
选项让你改变的入口点函数符号()
。
If you're compiling with gcc, specifying -e <symbol>
option will let you change the entry point to a function symbol()
.
这篇关于如何让其他的功能比用C main()的其他入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文