在hash.c中
31 /* With -DSTANDALONE, this file can be compiled outside Wget source
32 tree. To test, also use -DTEST. 如果加上DSTANDLONE,此文件在外面編譯。 */
33
34 #ifndef STANDALONE
35 # include "wget.h"
36 #endif
在html-parse.c
89 /* To test as standalone, compile with `-DSTANDALONE -I.'. You'll
90 still need Wget headers to compile. */
91
92 #include "wget.h"
93
94 #ifdef STANDALONE
95 # define I_REALLY_WANT_CTYPE_MACROS
96 #endif
test.c中是TESTING
31 #include <stdio.h>
32
33 #include "test.h"
34
35 #ifndef TESTING
36 #error "TESTING not set!!!"
37 #endif作者: 847608498 時間: 2012-02-10 11:18 回復(fù) 5# duanjigang
你好,我也在linux開發(fā)應(yīng)用程序時遇到了多個main函數(shù),但是這些main函數(shù)是如何被調(diào)用的?如何決定它被調(diào)用的時間,比如想加入一個led狀態(tài)燈(不同顏色表示移動設(shè)備的各種狀態(tài))的控制程序,有一個main函數(shù)main (int argc, char **argv),想在開發(fā)的這款移動設(shè)備開機時就開始運行這個應(yīng)用程序,就開啟led燈。那我新寫的這個應(yīng)用程序要怎么加載進來?另外這個main函數(shù)是帶參數(shù)的int argc, char **argv,它的參數(shù)是如何被傳遞進來的?是直接被調(diào)用嗎?但是我在里面看其他類似的應(yīng)用程序的main函數(shù)沒有被調(diào)用過(已實現(xiàn)的功能)。