Factsheet
How important are gcc versions?
c++ - Update GCC on Ubuntu - Stack Overflow
c++ - Should i use the latest GCC version ( in general, and specifically today ) - Stack Overflow
c++ - How to Check the Version of my gcc? - Stack Overflow
Videos
I have started getting unto assembly and optimising code and I was wandering how important if at all is it to upgrade the computer I am using.
Currently I am on gcc 11.4 which feels fairly old at this point when I am looking at what's out there.
Are the differences between versions thst big or is it generally fairly unimportant
In the absence of specific requirements to the contrary, I tend to use whichever version of gcc is supplied by my (reasonably up-to-date) Linux distribution. This policy has worked pretty well for me so far.
I tend to use the latest version, because it implements the latest features, fix bugs, but unfortunately introduce new bugs. Introduces bugs are usually on some weird corner cases, so I would assume it is safe to always use the latest version.
The symlink to the 4.8.2 directory is nothing to worry about, it's normal for the libstdc++ headers on Red Hat Enterprise Linux (and therefore CentOS) to be arranged like that.
gcc --version will tell you the version of the gcc executable in your path.
rpm -q libstdc++-devel will tell you the version of the package that owns the C++ standard library headers.
rpm -ql libstdc++-devel will list the files installed by that package, which will include the files under /usr/include/c++/4.8.2
rpm --verify libstdc++-devel will check that you haven't messed up the C++ headers by replacing them with something else.
The error is more concerning, that implies you have messed something up. My guess would be it's in the from [...omitted by myself as it is irrelevant] part, which may actually be very relevant. std::locale should be declared in <bits/locale_classes.h> which is included before <bits/locale_facets_nonio.h>, so if it wasn't declared my guess is that you have some header that defines _LOCALE_CLASSES_H and prevents the standard library header from being read. Do not define include guards that start with underscores, they are reserved names.
I am not quite sure but below is more information
Stackoverflow: version of libc
$ /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 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.
Compiled by GNU CC version 4.8.2.
Compiled on a Linux 3.13.9 system on 2014-04-12.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/eglibc/+bugs>.
mandar@ubuntu:~/Desktop$
Your Linux Mint comes pre-installed with a GCC package. So first I would recommend you to check if the package is already present in your system by typing the following command in terminal.
apt-cache search gcc
In case you're not having any such package then use the following command in terminal firstly you've add the following repository:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
then use the next command:
sudo apt-get update
sudo apt-get install g++-4.7 c++-4.7
There is always basic thing we should learn; take it as prerequisite before linux.. Learn googling... try to do more hard search ...
download the latest version of gcc
wget http://www.netgull.com/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.bz2
use command: tar -xjf to unzip the file
Enter the directory that you unzipped just now, say in $HOME/Downloads/gcc-5.3.0, then type command:
./configure --disable-checking --enable-languages=c,c++,objc
--disable-multilib --with-system-zlib prefix=/usr/bin/gcc-5.3
Dependency installation:build GCC requires GMP4.2+, MPFR 2.4.0+, and MPC 0.8.0+ and build essential
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev libc6-dev
sudo apt-get install build-essential
install a C++ compiler
sudo apt-get install g++
Next type:
make
sudo make install
Edit if you still get errors message like " zlib.h not found!" you can do the below to fix it:
apt-get install zlib1g-dev
πCongratulations to the GCC team!
πππ₯π₯ π€© π π₯³ π€ π» π₯ π
Release Notes
GNU Git Branch and Tag (quite slow)
Github mirror