Include and lib search paths

Edward Diener eldlistmailingz@tropicsoft.com
Mon Jun 22 01:25:00 GMT 2015


On 6/21/2015 1:58 PM, Jonathan Wakely wrote:
> 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.
>

Thanks for the explanation.



More information about the Gcc-help mailing list