public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* help with gcc on opensuse leap 15
@ 2018-08-29 13:58 KW via gcc-help
  2018-08-29 14:01 ` Jonathan Wakely
  2018-08-29 14:04 ` Igor Chudov
  0 siblings, 2 replies; 3+ messages in thread
From: KW via gcc-help @ 2018-08-29 13:58 UTC (permalink / raw)
  To: gcc help

I was wondering after compiling gcc why when I type in 'which gcc' it
still defaults to /usr/bin/gcc and not /usr/local/bin/gcc.

   If I compile gcc with a different prefix do you know if gcc will still
be detected by other programs looking for it?

Do you know how to go about changing the default in OpenSuSE Leap 15? Is
it the same for every linux distro?

KW

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help with gcc on opensuse leap 15
  2018-08-29 13:58 help with gcc on opensuse leap 15 KW via gcc-help
@ 2018-08-29 14:01 ` Jonathan Wakely
  2018-08-29 14:04 ` Igor Chudov
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Wakely @ 2018-08-29 14:01 UTC (permalink / raw)
  To: solidbusiness; +Cc: gcc-help

On Wed, 29 Aug 2018 at 14:59, KW via gcc-help <gcc-help@gcc.gnu.org> wrote:
>
> I was wondering after compiling gcc why when I type in 'which gcc' it
> still defaults to /usr/bin/gcc and not /usr/local/bin/gcc.
>
>    If I compile gcc with a different prefix do you know if gcc will still
> be detected by other programs looking for it?
>
> Do you know how to go about changing the default in OpenSuSE Leap 15? Is
> it the same for every linux distro?

See http://www.linfo.org/path_env_var.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: help with gcc on opensuse leap 15
  2018-08-29 13:58 help with gcc on opensuse leap 15 KW via gcc-help
  2018-08-29 14:01 ` Jonathan Wakely
@ 2018-08-29 14:04 ` Igor Chudov
  1 sibling, 0 replies; 3+ messages in thread
From: Igor Chudov @ 2018-08-29 14:04 UTC (permalink / raw)
  To: gcc-help; +Cc: KW

Hello!

Have you checked PATH variable like:

$ echo "$PATH"
/bin:/usr/bin:/usr/local/bin
$

?

gcc executable which was placed in /usr/bin will be found first. You will have to specify path to your gcc installation and libraries manually  in this case.

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org <gcc-help-owner@gcc.gnu.org> On Behalf Of KW via gcc-help
Sent: Wednesday, August 29, 2018 5:59 PM
To: gcc help <gcc-help@gcc.gnu.org>
Subject: help with gcc on opensuse leap 15

I was wondering after compiling gcc why when I type in 'which gcc' it still defaults to /usr/bin/gcc and not /usr/local/bin/gcc.

   If I compile gcc with a different prefix do you know if gcc will still be detected by other programs looking for it?

Do you know how to go about changing the default in OpenSuSE Leap 15? Is it the same for every linux distro?

KW


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-29 14:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 13:58 help with gcc on opensuse leap 15 KW via gcc-help
2018-08-29 14:01 ` Jonathan Wakely
2018-08-29 14:04 ` Igor Chudov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).