I'm fairly new to C and have been trying to edit an example code in a library. The example comes with a Makefile. Everything has been working fine, but I want to add another library to this example (along with the previous ones used), to test some new things. The library I am trying to add comes with a .c file and a .h file. I have copied both of these files into the same directory as the original include folder. I am not sure what is going wrong.
Here is the following error I get in console.
cc -I../../include -L../../lib -L../../lib64 main.c -o Biometry
-lbsapi /usr/bin/ld: skipping incompatible ../../lib/libbsapi.so when searching for -lbsapi /tmp/ccswByGY.o: In function `main': main.c:(.text+0xd4f): undefined reference to `tpl_map' main.c:(.text+0xd73): undefined reference to `tpl_pack' main.c:(.text+0xd8e): undefined reference to `tpl_dump' main.c:(.text+0xd9a): undefined reference to `tpl_free' collect2: error: ld returned 1 exit status Makefile:8: recipe for target 'Biometry' failed make: *** [Biometry] Error 1
Biometry: main.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) main.c -o Biometry $(LIBS)
The include folder contains:
bsapi.h
bserror.h
bssrv.h
bstypes.h
(including the two that I added):
tpl.h,
tpl.c
(I'm not sure if this goes here?)
In my code I've included the extra library; it now starts off like this: