I want to change an existing makefile to include another static library that I made myself. I followed some instructions to make the library; it currently holds all the .o
files except for main.o
. Let's call my library libABC.a
. If it makes a difference, the package I'm modifying is written in C++ and the library I'm including is written in C.
So far I've added -lABC
to my library list and placed the library in the same directory as the other libraries so that I don't have to add another -L
command. I've moved all the header files to the /include
directory of the package (not sure if I had to do this) so I can avoid adding another -I
command. Compiling as it is gives me no errors, but if I try to add a #include
command for one of the header files from the library and call a function, I get a undefined reference to function()
error.
Any ideas on what I can do?