rt,错误信息如下:
/tmp/ccxxSWt2.o: in function `add(int, int, int)':
foo.cc:(.text+0x86): relocation truncated to fit: R_X86_64_PC32 against symbol `cnt' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0x98): relocation truncated to fit: R_X86_64_PC32 against symbol `cnt' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0xa3): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0xae): relocation truncated to fit: R_X86_64_PC32 against symbol `head' defined in .bss section in /tmp/ccxxSWt2.o
/tmp/ccxxSWt2.o: in function `SPFA(int)':
foo.cc:(.text+0x213): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0x23a): relocation truncated to fit: R_X86_64_PC32 against symbol `head' defined in .bss section in /tmp/ccxxSWt2.o
/tmp/ccxxSWt2.o: in function `SPFA_pre()':
foo.cc:(.text+0x611): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0x61d): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0x66f): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0x6ae): relocation truncated to fit: R_X86_64_PC32 against symbol `head' defined in .bss section in /tmp/ccxxSWt2.o
foo.cc:(.text+0x749): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
add函数如下:
void add(int u,int v,int w)
{
e[++cnt].to=v;
e[cnt].dist=head[u];
e[cnt].val=w;
head[u]=cnt;
return;
}
求调qwq