Pregunta

I'm trying to make a library and want to copy the header file to the dylib, but when I put libAC.h in libAC_FILES, I get this error when I compile

 *** No rule to make target `obj/libAC.h.f3cc93fd.o', needed by `obj/libAC.dylib.ba964c90.unsigned'.  Stop.

I want it to be that when I make a different application, I can do #include <libAC.h> and use the methods from that library, but I can't find any examples on how to do this. This is for a jailbroken device, by the way. I'm using the library template in theos, and using make package install to make the library and install it to my phone, if it helps. What im trying to do is install the header file for my dylib to /usr/include

¿Fue útil?

Solución

Headers are not supposed to get bundled into a library binary. A dylib is a shared library that is binary only.

A dylib is not the same thing as a framework (which is a bundle of a library and its headers) - I guess that is where your confusion comes from.

For allowing you to include the headers needed for using functions of your library, you will need to put those into the header-search-path of your compiler. You may certainly also extend that path towards any folder that contains your header/s.

Since you are using some packaging script as it seems, check with the documentation of that script (or simply analyse it).

And as a final note, do not use the sharp brackets (<, >) for delimiting custom header includes. Only system headers are supposed to get those. Use standard quote marks instead (").

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top