customizing the the path for lib and include

Jul 3, 2010 at 11:54am
Hi,
When I add my own library to the system, I need to add the path in the command line like

gcc prog.c -lPers -L/PathToMyLib -I/PathToMyInclude
I want to add the path to the gcc compiler, where to change it.
thanks
best regards
Jul 4, 2010 at 12:11am
You would have to change it the compiler source code and recompile the compiler.
Jul 5, 2010 at 1:41am
what is the reason for that?
"gcc prog.c -lPers -L/PathToMyLib -I/PathToMyInclude" is enougth.
Jul 6, 2010 at 2:14pm
I think the order of those arguments has significance. Try moving -lPers after -L/PathToMyLib.
Topic archived. No new replies allowed.