Installing header files for mac osx statserve


I have a question about installing header files. I had a tough time installing and using the lcthw library on my macbook pro (High Sierra 10.13.3). First I make installed the lcthw. Then when I make statserve, I get the following error.

src/net.c:4:10: fatal error: 'lcthw/ringbuffer.h' file not found

I took a look at /usr/local/include and didn’t see a lcthw folder there. I manually created a folder there and added header files and it works. Is there a better way to handle the header files?

Make install installs the liblcthw.a file into /usr/local/bin. But there is nothing in the makefile that deals with header files as far as I can tell.


Kenichiro Kurihara

You may need to adjust the Makefile to indicate that the header files are right there or are located somewhere else. I believe you have to set -I (dash eye) at least.


Thanks for the suggestion. I got things working.

I have one more question. Is it common practice to copy over the header files in /usr/local/include? Or is it better to just point the -I to where the source code lives?

You copy the headers to /usr/local/ when you want to access them from a bunch of builds through a .so file or similar library. But, if you’re doing that to compile the libltchw code then that’s wrong.