c - Error creating shared library on Linux -
i have created makefile c shared library. tried using -o
& -fpic
flags after shared
word. same error. not sure wrong makefile.
makefile
myprogram: main.o libmylib.so gcc -lm -o myprogram main.o -l. -lmylib main.o: main.c gcc -o -c main.c main.h addsorted.o: addsorted.c addsorted.h gcc -c -fpic addsorted.c freelinks.o: freelinks.c freelinks.h gcc -c -fpic freelinks.c libmylib.so: addsorted.o freelinks.o gcc -shared libmylib.so addsorted.o freelinks.o all: myprogram libs: libmylib.so clean: rm -f myprogram *.o *.a *.gch
linux terminal error
gcc -shared libmylib.so addsorted.o freelinks.o gcc: libmylib.so: no such file or directory make: *** [libmylib.so] error 1
Comments
Post a Comment