PDA

View Full Version : Including self defined header file



anon10366
29-09-2012, 11:20 AM
Hi,

I have made a main.c file in which i have included a functions.h file and also written this header file. But when I am trying to compile main.c file it is giving the error that

error: functions.h: No such file or directory

anup
29-09-2012, 11:21 AM
Anon10366,

I believe you are not using the correct option, gcc -I<include file path> <file.c>

e.g. gcc -I. main.c assuming functions.h is in the current directory.

Thanks,

Anup