我使用捕捉庫單元測試Catch Lib問題 - 匿名命名空間重新定義。如何解決
以前,我單獨測試一個頭,並與TEST_CASEs但最終經過包括所有的這些到我面臨着很多誤區,如項目沒有問題這個:
c:\dev\workspace\algolist\src\algolist.hpp(143): error C2374: '`anonymous-namespace'::autoRegistrar143': redefinition; multiple initialization
c:\dev\workspace\algolist\src\mfactory.hpp(143): note: see declaration of '`anonymous-namespace'::autoRegistrar143'
c:\dev\workspace\algolist\src\algolist.hpp(143): error C2084: function 'void ____C_A_T_C_H____T_E_S_T____143(void)' already has a body
c:\dev\workspace\algolist\src\mfactory.hpp(143): note: see previous definition of '____C_A_T_C_H____T_E_S_T____143'
有人能解釋一下這是什麼意思?
不知道的框架,但似乎是宏只是基於沒有文件名的代碼行可能正在創建函數和命名空間的名稱,因爲這兩個文件都在143線東西有一個名稱衝突現在 –