I am trying to statically link a C++ library to a C project but can't seem to figure a way out. I read multiple posts but nothing helped. Below is the snippet of my Makefile:
CFLAGS += -I../path/to/headers
LIBS += ../path/to/lib.a
I get the below linking error:
"undefined reference to ...
collect2: ld returned 1 exit status"
I checked this post for ordering but I don't that is an issue here: c++ undefined references with static library
I wanted to know if it is even possible. If so, what flags I would need to add into my C project Makefile.