我試圖還原函數我的鏈接錯誤發生變化,如d工具ddemangle.d不輸出DMD + GNU ld進行鏈接錯誤
dmd -debug -gc -unittest -D -Dd/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/ -w ~/Work/cognia/t_geometry.d -of/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/t_geometry
/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/t_geometry.o:(.data+0x6d8): undefined reference to `_D4gl3n6linalg12__ModuleInfoZ'
/home/per/.emacs.d/auto-builds/dmd/Debug-Boundscheck-Unittest/home/per/Work/cognia/t_geometry.o: In function `_D4gl3n6linalg16__T6VectorTfVi4Z6Vector19__unittestL103_7189FNaNbNfZv':
/home/per/Work/cognia/gl3n/linalg.d:104: undefined reference to `_D4gl3n6linalg15__unittest_failFiZv'
/home/per/Work/cognia/gl3n/linalg.d:105: undefined reference to `_D4gl3n6linalg15__unittest_failFiZv'
通過在github上使用ddemangle.d
從dtools回購作爲
same_command_as_above | ddemangle
但我得到相同的輸出使用DMD 2.063.2和git master。
ddemangle.d不是uptodate?
更新:好的。謝謝!
same_command_as_above 2>&1 | ddemangle
demangles大部分的消息,但不是全部。我想知道爲什麼。這裏有一些行
/home/per/Work/cognia/gl3n/linalg.d:1814: undefined reference to `void gl3n.linalg.__unittest_fail(int)'
/home/per/Work/cognia/gl3n/linalg.d:695: undefined reference to `_D4gl3n6linalg19__T6MatrixTfVi2Vi2Z6Matrix6__initZ'
/home/per/Work/cognia/gl3n/linalg.d:695: undefined reference to `_D4gl3n6linalg19__T6MatrixTfVi2Vi2Z6Matrix6__initZ'
/home/per/Work/cognia/gl3n/linalg.d:1815: undefined reference to `void gl3n.linalg.__unittest_fail(int)'
線索任何人?
'__initZ'符號包含一個類型(用於初始化新值)的默認值。在語言中,這對應於所有類型的隱式'.init'屬性。這些目前沒有被刪除 - 參見[bug 10189](http://d.puremagic.com/issues/show_bug.cgi?id=10189)。 –
順便說一句,在將來你應該通過編輯你的問題來修改你的問題,並留下對你所追蹤的答案的評論。 –