I have looked at a few places to figure out where to place the file on Macs, and it seems that placing them into /usr/lib/libmylib.dylib
and /usr/include/mylib.h
is the correct place, rather than either in the HOME directory, or in /usr/local/lib
. (This is for something the user installs on their computer).
Please let me know if that is correct.
Then the rest of my question is where is the equivalent (i.e. best) place to place a C lib on windows and linux. Looking here for windows says either %windir%\system32
or %SystemRoot%\winsxs
. But then they go about seemingly saying that it's still a bad place to put it for several reasons. So I'm not sure there.
Then the rest is how to do it for Linux. Seems to be the same as on Mac.
The end goal is so someone can simply do #include <mylib.h>
in their C code and get it to work.