Ho una domanda sull'include: ho provato a creare una nuova cartella in cui ho messo i file read_line.c e read_line.h. Successivamente al posto di include "read_line.h" ho messo il percorso relativo include "..\read_line\read_line.h".
Non capisco come mai mi dia errore. Uso NetBeans e ho creato il progetto come una libreria statica, forse dovevo crearla come applicazione C? Se provo ad usare il metodo il compilatore mi segnala questo errore:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/M68/Documents/NetBeansProjects/fork_operazioni'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin_4.x-Windows/fork_operazioni.exe
make[2]: Entering directory '/cygdrive/c/Users/M68/Documents/NetBeansProjects/fork_operazioni'
cygwin warning:
MS-DOS style path detected: ..\read_line\read_line.h
Preferred POSIX equivalent is: ../read_line/read_line.h
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/usin...sing-pathnames
mkdir -p build/Debug/Cygwin_4.x-Windows
rm -f "build/Debug/Cygwin_4.x-Windows/main.o.d"
gcc -c -g -MMD -MP -MF "build/Debug/Cygwin_4.x-Windows/main.o.d" -o build/Debug/Cygwin_4.x-Windows/main.o main.c
main.c: In function 'main':
main.c:24:5: warning: passing argument 3 of 'read_line' from incompatible pointer type [enabled by default]
int r = read_line(0, 21, buffer);
^
In file included from main.c:16:0:
..\read_line\read_line.h:15:5: note: expected 'char *' but argument is of type 'char **'
int read_line(int fd, int buffer_size, char* buffer);
^
main.c:29:5: warning: passing argument 1 of 'open' from incompatible pointer type [enabled by default]
int fd = open(buffer, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IXUSR);
^
In file included from /usr/include/sys/fcntl.h:3:0,
from /usr/include/fcntl.h:14,
from main.c:14:
/usr/include/sys/_default_fcntl.h:190:12: note: expected 'const char *' but argument is of type 'char **'
extern int open _PARAMS ((const char *, int, ...));
^
mkdir -p dist/Debug/Cygwin_4.x-Windows
gcc -o dist/Debug/Cygwin_4.x-Windows/fork_operazioni build/Debug/Cygwin_4.x-Windows/main.o
build/Debug/Cygwin_4.x-Windows/main.o: In function `main':
/cygdrive/c/Users/M68/Documents/NetBeansProjects/fork_operazioni/main.c:24: undefined reference to `read_line'
/cygdrive/c/Users/M68/Documents/NetBeansProjects/fork_operazioni/main.c:24.text+0x31): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `read_line'
collect2: error: ld returned 1 exit status
nbproject/Makefile-Debug.mk:62: recipe for target 'dist/Debug/Cygwin_4.x-Windows/fork_operazioni.exe' failed
make[2]: *** [dist/Debug/Cygwin_4.x-Windows/fork_operazioni.exe] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/M68/Documents/NetBeansProjects/fork_operazioni'
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/M68/Documents/NetBeansProjects/fork_operazioni'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 950ms)