Results 1 to 6 of 6
Hello
I have just started working with gcc.
I created a header file(.h file with some macros and function prototypes) and included it in my .c file.
But gcc while ...
- 05-30-2008 #1Just Joined!
- Join Date
- Jul 2005
- Posts
- 41
gcc not able to find user defined headers
Hello
I have just started working with gcc.
I created a header file(.h file with some macros and function prototypes) and included it in my .c file.
But gcc while compiling said, could not find grid.h, tat's my header file name,
But whe I included the whole path to the header file in my #include in .c file line this
#include</amd/poptart/root/t/tarora/rmfol/grid.h>
it had no problem because it got compkete path.
How can I avoid this, that is using complete path and make gcc look into the folder , as my .c and .h file are in same folder
-Thank you
- 05-30-2008 #2Just Joined!
- Join Date
- Jul 2005
- Posts
- 41
I am on Ubuntu fiest 7.04
- 05-30-2008 #3
try
#include "grid.h"
- 05-31-2008 #4Just Joined!
- Join Date
- Jul 2005
- Posts
- 41
no,it still can't find grid.h?
- 05-31-2008 #5Just Joined!
- Join Date
- Apr 2005
- Location
- Romania
- Posts
- 42
.c and .h in the same directory. And then, as gerard4143 said, #include "grid.h"
- 05-31-2008 #6
Quick question...is there a grid.o file and are you compiling with it i.e.
gcc grid.o test.o -o test
P.S. could you post the error message...Thanks


Reply With Quote