This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Include and lib search paths
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Edward Diener <eldlistmailingz at tropicsoft dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Sun, 21 Jun 2015 18:58:39 +0100
- Subject: Re: Include and lib search paths
- Authentication-results: sourceware.org; auth=none
- References: <mm44g1$3vv$1 at ger dot gmane dot org>
On 20 June 2015 at 17:30, Edward Diener wrote:
> I use both Windows and Linux. On Windows when using mingw or mingw-64 I
> noticed that the search paths for include directories and lib directories
> were hardcoded to c:\mingw. This fact makes it much harder to run multiple
> versions of gcc on Windows. When I asked why absolute hardcoded paths were
> used instead of relative paths to the gcc installation I was told this was
> because gcc itself did it this way.
>
> So now I ask here. Why does gcc use hardcoded absolute paths to include and
> lib directories when relative paths within a gcc installation would make gcc
> much more portable and would make it much easier for multiple versions of
> gcc to co-exist ?
The only hardcoded ones are paths such as /usr/include and /usr/lib,
all paths to GCC's own files should use relative paths.
This might be a mingw limitation, it's not a GCC one.