Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #162808
| From | scott@slp53.sl.home (Scott Lurndal) |
|---|---|
| Subject | Re: How to print gcc include path using C? |
| Newsgroups | comp.lang.c |
| References | <495715dd-5751-4e4c-aca9-5e21eeeea523n@googlegroups.com> <sicp12$4ia$1@z-news.wcss.wroc.pl> <b83285a3-66df-438a-a949-f9c3c8acafdfn@googlegroups.com> <n5r2J.115515$rl3.104681@fx45.iad> <sidfn7$2cth0$2@news.xmission.com> |
| Message-ID | <7as2J.25867$j52.6015@fx18.iad> (permalink) |
| Organization | UsenetServer - www.usenetserver.com |
| Date | 2021-09-21 21:30 +0000 |
gazelle@shell.xmission.com (Kenny McCormack) writes: >In article <n5r2J.115515$rl3.104681@fx45.iad>, >Scott Lurndal <slp53@pacbell.net> wrote: >>Thiago Adams <thiago.adams@gmail.com> writes: >>>On Tuesday, September 21, 2021 at 11:08:41 AM UTC-3, anti...@math.uni.wroc.pl wrote: >>> >>>> In case you missed it: 7 in '/usr/lib/gcc/x86_64-linux-gnu/7/include' >>>> is version number, so will be different for different gcc versions. >>>> 'x86_64-linux-gnu' is platform name, on different platform like >>>> ARM it will be different. >>> >>>How can I find out what is the default gcc? (sorry I am a windows >>>developer, generally this kind of information is on Windows registry >>>but I have no idea where to find this on Linux - This is a little of topic >>>but it also interesting for C developers to know where the compiler gets >>>its headers from) >> >>There is no "default" GCC. Every linux distribution is free to ship >>whatever version of GCC they desire. RHEL6/7, for example, still >>ship GCC4, while the latest Ubuntu may have GCC10 or GCC11; and >>a LTS release of Ubuntu may have an earlier version. > >I assumed the question was: How can I find out what the default version ON >THIS MACHINE is. "gcc -v" will tell you. > >The point is that there may be many versions of gcc installed on a given >machine. If your shell is more or less modern, the following keystroke >combo should tell you what all versions are installed: Not necessarily. On our development systems: $ module avail -t 2>&1 | grep ^gcc gcc/10.1 gcc/10.2 gcc/10.3 gcc/11.1 gcc/11.2 gcc/4.4 (default) gcc/4.8.5 gcc/4.9 gcc/4.9.3 gcc/4.9.4 gcc/5.1 gcc/5.2 gcc/5.3 gcc/5.4 gcc/5.5 gcc/6.3 gcc/6.4 gcc/6.5 gcc/7.1 gcc/7.2 gcc/7.3 gcc/7.4 gcc/7.5 gcc/8.1 gcc/8.2 gcc/8.3 gcc/8.4 gcc/8.5 gcc/9.1 gcc/9.2 gcc/9.3 gcc/9.4 gcc/latest $ gcc --version gcc (GCC) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ module unload gcc/9.3 $ module load gcc/7.2 $ gcc --version gcc (GCC) 7.2.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to print gcc include path using C? Thiago Adams <thiago.adams@gmail.com> - 2021-09-20 11:48 -0700
Re: How to print gcc include path using C? Bart <bc@freeuk.com> - 2021-09-20 20:45 +0100
Re: How to print gcc include path using C? Thiago Adams <thiago.adams@gmail.com> - 2021-09-20 12:55 -0700
Re: How to print gcc include path using C? scott@slp53.sl.home (Scott Lurndal) - 2021-09-20 21:53 +0000
Re: How to print gcc include path using C? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-20 17:54 -0700
Re: How to print gcc include path using C? Thiago Adams <thiago.adams@gmail.com> - 2021-09-21 05:07 -0700
Re: How to print gcc include path using C? scott@slp53.sl.home (Scott Lurndal) - 2021-09-21 14:00 +0000
Re: How to print gcc include path using C? Mark Bluemel <mark.bluemel@gmail.com> - 2021-09-21 07:07 -0700
Re: How to print gcc include path using C? antispam@math.uni.wroc.pl - 2021-09-21 14:08 +0000
Re: How to print gcc include path using C? Thiago Adams <thiago.adams@gmail.com> - 2021-09-21 12:01 -0700
Re: How to print gcc include path using C? gazelle@shell.xmission.com (Kenny McCormack) - 2021-09-21 20:13 +0000
Re: How to print gcc include path using C? scott@slp53.sl.home (Scott Lurndal) - 2021-09-21 20:17 +0000
Re: How to print gcc include path using C? gazelle@shell.xmission.com (Kenny McCormack) - 2021-09-21 20:35 +0000
Re: How to print gcc include path using C? scott@slp53.sl.home (Scott Lurndal) - 2021-09-21 21:30 +0000
Re: How to print gcc include path using C? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-21 13:37 -0700
Re: How to print gcc include path using C? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-21 14:07 -0700
Re: How to print gcc include path using C? antispam@math.uni.wroc.pl - 2021-09-21 23:05 +0000
csiph-web