Closed zlfccnu closed 10 years ago
Ah, this issue has crawled in when I added plgen
as an executable to the project. If you don't need plgen
(which generates power-law distributed numbers), just remove src/plgen.c
and try to recompile. Otherwise, replace ../src/*.c
with the list of every single *.c
file in src
except plgen.c
to compile plfit
.
if I compile the code with "gcc -o plfit -I../src -lm ../src/.c" it will through out errors below: gcc -o plfit -I ./src -lm ./src/.c /tmp/cctYgdqz.o:in function ‘show_version’: plgen.c:(.text+0x0): multiple definition of
show_version' /tmp/ccn93Qkq.o:main.c:(.text+0x0):first definition here /tmp/cctYgdqz.o:in function ‘usage’: plgen.c:(.text+0x2a): multiple definition of
usage' /tmp/ccn93Qkq.o:main.c:(.text+0x2a):first definition here /tmp/cctYgdqz.o:in function ‘parse_cmd_options’: plgen.c:(.text+0x86): multiple definition ofparse_cmd_options' /tmp/ccn93Qkq.o:main.c:(.text+0x86):first definition here /tmp/cctYgdqz.o:in function ‘main’: plgen.c:(.text+0x829): multiple definition of
main' /tmp/ccn93Qkq.o:main.c:(.text+0xdfd):first definition here collect2: error: ld returned 1 exit status really appreciate your reply!