尝试使用我自己的 GDC-4.8-20120105 构建在 D 中构建 Hello World
import std.stdio;
void main(string args[])
{
auto x = 0b10;
writeln(x);
}
我收到以下错误:
per@lappis:~/alt$ gdc-4.8 ~/f.d /home/per/alt/x86_64-unknown-linux-gnu/lib64/libgphobos2.a
/usr/lib/x86_64-linux-gnu/crt1.o(.text+0x20): error: undefined reference to 'main'
/tmp/cc8j7g1e.o:f.d:function _D1f9__modinitFZv: error: undefined reference to '_Dmodule_ref'
/tmp/cc8j7g1e.o:f.d:function _D1f9__modinitFZv: error: undefined reference to '_Dmodule_ref'
/tmp/cc8j7g1e.o:f.d:function _D1f12__ModuleInfoZ: error: undefined reference to '_D3std5stdio12__ModuleInfoZ'
...
怎么了?