2016-08-30 27 views
3

此問題是由於doxygen解析約束。我在Kinetis Design Studio中爲嵌入式C開發使用了doxygen 1.8.11和Eclox(eclipse插件)。Doxygen:從陣列創建時在組內創建文件時報警結束

幾乎所有的doxygen編譯工作,除了我需要有一些非常大的靜態數組。我不想弄亂主要的代碼,所以我用了一個劈我這些論壇上找到(https://stackoverflow.com/a/4645515/6776259):

static const float Large_Array[2000] = { 
#include "Comma_Delimited_Text_File.txt" 
}; 

不幸的是,黑客是導致我的main.c main_module組的編譯失敗。並出現以下錯誤:

警告:文件的末尾,而一組

內我試過,不包括我main_module組這些常量的東西,如下列:

/*! 
** @addtogroup main_module 
** @{ 
*/ 
... 
... header code ... 
... 
/*! 
** @} 
*/ 
static const float Large_Array[2000] = { 
#include "Comma_Delimited_Text_File.txt" 
}; 
/*! 
** @addtogroup main_module 
** @{ 
*/ 
... 
More code, definitions, etc. 
None of this is generated in the doxygen compile...? 
/*! 
** @} 
*/ 

這將擺脫doxygen編譯錯誤,但編譯的doxygen文檔在Large_Array聲明之後不包含任何內容。所以看起來第二個@addtogroup語句不起作用。

我是否缺少一些簡單的東西?任何幫助表示讚賞。謝謝。

回答

1

如果Comma_Delimited_Text_File.txt沒有尾隨換行符,則嘗試添加一個。

如果包含文件不以換行符結束,則Doxygen會感到困惑。這可能會破壞其他文件的文檔生成,即使它們看起來沒有關係。通常這會導致缺少符號和broken callgraphs

+0

聽起來像是要提交錯誤報告的東西。你可以這樣做:https://bugzilla.gnome.org/enter_bug.cgi?product = doxygen – doxygen