![]() |
| ||
| Change standard include path Hi everybody, I have a problem in include path. i want to keep my all header file in folder named myInclude and include it like #include<myInclude/header.h>, Is there any possible way to do this, if there is than please tell me the step. thanks in advance........... |
| ||
| Re: Change standard include path Use unix profile file |
| ||
| Re: Change standard include path Hey there, If you're doing this for C, you can just use quotes instead of the angle brackets, like #include "/home/yourdir/myInclude/header.sh" If you're using a shell and your includes are functions, you can put them in your .profile, as advised above or just create your header.sh file and source it at the head of all of your script like: #!/bin/bash and you'll be all set :) , Mike |
| ||
| Re: Change standard include path > #include "/home/yourdir/myInclude/header.sh" Don't do this. Absolute paths to header files are a disaster waiting to happen. If you reorganise your workspace, or give the code to someone else, then you have to edit ALL the code just to make it compile again. Instead, do gcc -I/home/yourdir prog.c where /home/yourdir is the place where the myInclude directory exists, containing the header.h file. |
| ||
| Re: Change standard include path Thank u salem. its working........... |
| All times are GMT -4. The time now is 1:11 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC