Results 1 to 3 of 3
hi, suppose I am in a subdirectory within /home/usr
as
Code:
/home/usr/dir1
and i can compile as
Code:
gcc -c file.c
This works.however, suppose i am at root and want ...
- 06-16-2011 #1Just Joined!
- Join Date
- Jun 2011
- Location
- dallas ,texas
- Posts
- 18
trouble compiling in predefined directory from root
hi, suppose I am in a subdirectory within /home/usr
as
and i can compile asCode:/home/usr/dir1
This works.however, suppose i am at root and want to compile the same code. i useCode:gcc -c file.c
orCode:gcc -c -I~/dir1 file.c
i get the error : no such file or directory.Code:gcc -c -I/home/usr/dir1 file.c
where am i wrong? what is te right syntax for -I with gcc?
thanks
- 06-19-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 06-19-2011 #3Just Joined!
- Join Date
- Jun 2011
- Location
- dallas ,texas
- Posts
- 18
Thanks,
so, with no header files, i can just give path w/o I directive.


Reply With Quote
