I have a small programm that use one installed lib, in tree view it looks like:
`-main.c` `-include/include.h` `-makefile` I compile it like:
gcc $(CFLAGS) -I/usr/include/xlsxwriter -L/usr/lib64/ -lxlsxwriter -o $@ $(OBJS) But i have some trouble with adding include.h from include dir. I tried this, but it doesn't work:
gcc $(CFLAGS) -I/usr/include/xlsxwriter include/ -L/usr/lib64/ -lxlsxwriter -o $@ $(OBJS) main.c contains:
#include <xlswriter.h> #include "include.h" How could i include my own include.h file to compiler options?
-Iinclude. See "How to add multiple header include and library directories to the search path in a single gcc command?"-Ioption for each added include path.