A
a
Don't know why this compilation generated, I'm sure no 2 mains exist:
make votei
gcc vote.c datamanager.c -o votei vote.c -L. -lhungarian
vote.c: In function `main':
vote.c:254: warning: passing arg 2 of `hungarian_init' from incompatible
pointer type
vote.c: In function `main':
vote.c:254: warning: passing arg 2 of `hungarian_init' from incompatible
pointer type
/tmp/ccsVGl95.o(.text+0x0): In function `main':
: multiple definition of `main'
/tmp/ccSVKJyx.o(.text+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [votei] Error 1
Makefile:
CC = gcc
AR = ar
CFLAGS = -O3 -Wall -I.
LDFLAGS = -L. -lhungarian
all: libhungarian.a hungarian_test
votei: vote.c datamanager.c $(HUNGARIANLIB)
$(CC) $(CFLAGS) vote.c datamanager.c assignmentoptimal.c -o $@ $<
$(LDFLAGS)
votei: vote.c datamanager.c $(HUNGARIANLIB)
$(CC) vote.c datamanager.c -o $@ $< $(LDFLAGS)
why comp.lang.c faq hasn't covered compilation topic? Where should I go for
more information?
make votei
gcc vote.c datamanager.c -o votei vote.c -L. -lhungarian
vote.c: In function `main':
vote.c:254: warning: passing arg 2 of `hungarian_init' from incompatible
pointer type
vote.c: In function `main':
vote.c:254: warning: passing arg 2 of `hungarian_init' from incompatible
pointer type
/tmp/ccsVGl95.o(.text+0x0): In function `main':
: multiple definition of `main'
/tmp/ccSVKJyx.o(.text+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [votei] Error 1
Makefile:
CC = gcc
AR = ar
CFLAGS = -O3 -Wall -I.
LDFLAGS = -L. -lhungarian
all: libhungarian.a hungarian_test
votei: vote.c datamanager.c $(HUNGARIANLIB)
$(CC) $(CFLAGS) vote.c datamanager.c assignmentoptimal.c -o $@ $<
$(LDFLAGS)
votei: vote.c datamanager.c $(HUNGARIANLIB)
$(CC) vote.c datamanager.c -o $@ $< $(LDFLAGS)
why comp.lang.c faq hasn't covered compilation topic? Where should I go for
more information?