我正在尝试消除我的链接错误,例如
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'
通过使用ddemangle.d
github 上的 dtools repo 作为
same_command_as_above | ddemangle
但我使用 DMD 2.063.2 和 git master 得到了相同的输出。
ddemangle.d 不是最新的吗?
更新:好的。谢谢!
same_command_as_above 2>&1 | ddemangle
破坏大部分消息,但不是全部。我想知道为什么。这里有几行
/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)'
线索有人吗?