在main先後調用函數的方法

方法一:使用__attribute宏web // 可聲明多個constructor,在main前調用多個函數 __attribute((constructor)) void before_main() { printf("%s\n",__FUNCTION__); } __attribute((destructor)) void after_main() {
相關文章
相關標籤/搜索