L
LSunanda
Hi,
I have a library libladr.a. I have another set of C files. I am trying
to link this library to my program. In teh file unification.c, I have
#include ./ladr/unify.h
But I am getting error "parse error...255"
I think this is because there are some macros (but with different
defnitions) in the library and my program files with the same name.
Is it possible for me to link a library with the same macros as my
program files? If so, could somebody please guide me with the process.
Or do I have to find all the macros that are common and replace with a
different name in one of the two? If so, how do I find which ones are
shared. There are quite a lot of files in that library.
Any help is highly appreciated.
My makefile is given below:
CC = cc -g
smaran: main.o hash.o set_def.o rec_trs2.o util2.o tree.o init.o prep.o
help.o nll_ac_match.o needsgraph.o lhsheight.o unify.o
$(CC) -o smaran hash.o init.o main.o rec_trs2.o set_def.o tree.o
util2.o prep.o help.o nll_ac_match.o needsgraph.o lhsheight.o unify.o
../ladr/libladr.a
main.o: main.c tree.h global.h extern.h pcomm.h
$(CC) -c main.c
hash.o: hash.c tree.h error.h extern.h
$(CC) -c hash.c
set_def.o: set_def.c tree.h extern.h
$(CC) -c set_def.c
rec_trs2.o: rec_trs2.c tree.h extern.h
$(CC) -c rec_trs2.c
util2.o: util2.c tree.h extern.h
$(CC) -c util2.c
tree.o: tree.c tree.h extern.h
$(CC) -c tree.c
init.o: init.c tree.h extern.h
$(CC) -c init.c
prep.o: prep.c prep.h extern.h
$(CC) -c prep.c
help.o: help.c extern.h
$(CC) -c help.c
nll_ac_match.o: nll_ac_match.c tree.h extern.h
$(CC) -c nll_ac_match.c
needsgraph.o: needsgraph.c tree.h error.h extern.h
$(CC) -c needsgraph.c
lhsheight.o: lhsheight.c tree.h error.h extern.h
$(CC) -c lhsheight.c
unification.o: unification.c tree.h error.h extern.h
$(CC) -c unification.c
clean:
rm *.o smaran
Thanks,
Sunanda.
I have a library libladr.a. I have another set of C files. I am trying
to link this library to my program. In teh file unification.c, I have
#include ./ladr/unify.h
But I am getting error "parse error...255"
I think this is because there are some macros (but with different
defnitions) in the library and my program files with the same name.
Is it possible for me to link a library with the same macros as my
program files? If so, could somebody please guide me with the process.
Or do I have to find all the macros that are common and replace with a
different name in one of the two? If so, how do I find which ones are
shared. There are quite a lot of files in that library.
Any help is highly appreciated.
My makefile is given below:
CC = cc -g
smaran: main.o hash.o set_def.o rec_trs2.o util2.o tree.o init.o prep.o
help.o nll_ac_match.o needsgraph.o lhsheight.o unify.o
$(CC) -o smaran hash.o init.o main.o rec_trs2.o set_def.o tree.o
util2.o prep.o help.o nll_ac_match.o needsgraph.o lhsheight.o unify.o
../ladr/libladr.a
main.o: main.c tree.h global.h extern.h pcomm.h
$(CC) -c main.c
hash.o: hash.c tree.h error.h extern.h
$(CC) -c hash.c
set_def.o: set_def.c tree.h extern.h
$(CC) -c set_def.c
rec_trs2.o: rec_trs2.c tree.h extern.h
$(CC) -c rec_trs2.c
util2.o: util2.c tree.h extern.h
$(CC) -c util2.c
tree.o: tree.c tree.h extern.h
$(CC) -c tree.c
init.o: init.c tree.h extern.h
$(CC) -c init.c
prep.o: prep.c prep.h extern.h
$(CC) -c prep.c
help.o: help.c extern.h
$(CC) -c help.c
nll_ac_match.o: nll_ac_match.c tree.h extern.h
$(CC) -c nll_ac_match.c
needsgraph.o: needsgraph.c tree.h error.h extern.h
$(CC) -c needsgraph.c
lhsheight.o: lhsheight.c tree.h error.h extern.h
$(CC) -c lhsheight.c
unification.o: unification.c tree.h error.h extern.h
$(CC) -c unification.c
clean:
rm *.o smaran
Thanks,
Sunanda.