Installing a newer (or older) version of GCC than the Ubuntu default version via the package manager does not delete the default version. You get both. You can install as many versions as you like. gcc/g++
will continue to run the default version. If you have installed GCC 7, then you run the new compilers with gcc-7
or g++-7
. For most build systems, it is sufficient to set the environment variables CC=gcc-7 CXX=g++-7
before starting the build.
Related Posts:
- What is the difference between g++ and gcc?
- C++ undefined reference to defined function
- Undefined reference to vtable
- make: g++: Command not found
- Undefined reference to vtable
- Compiling C++11 with g++
- “g++” is not recognized as an internal or external command, MinGW
- Eclipse C++ : “Program “g++” not found in PATH”
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- “g++” is not recognized as an internal or external command, MinGW
- Compiling a C++ program with gcc
- Undefined reference to class constructor, including .cpp file fixes
- gcc/g++: “No such file or directory”
- error: use of deleted function
- Undefined reference to constructor
- expected unqualified-id before string constant
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- extra qualification error in C++
- C++ Error ‘nullptr was not declared in this scope’ in Eclipse IDE
- Error: free(): invalid next size (fast):
- Error: free(): invalid next size (fast):
- I get this error: “glibc detected”
- Update GCC on OSX
- G++ undefined reference to class::function
- Undefined reference to class constructor, including .cpp file fixes
- Difference between
and - Getting a bunch of crosses initialization error
- Expected unqualified-id before ‘[‘ token
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- What does “-Wall” in “g++ -Wall test.cpp -o test” do?
- Compiling C++11 with g++
- What is a .h.gch file?
- Link error “undefined reference to `__gxx_personality_v0′” and g++ [duplicate]
- How many spaces for tab character(\t)?
- How do I build a graphical user interface in C++? [closed]
- What are the differences between a pointer variable and a reference variable in C++?
- outputting ascii table in C++
- What is the effect of extern “C” in C++?
- How to make a SIMPLE C++ Makefile
- finding dll for “The specified module could not be found”
- no matching function for call to ‘ ‘
- Read file line by line using ifstream in C++
- Convert an int to ASCII character
- When should I write the keyword ‘inline’ for a function/method?
- When does a process get SIGABRT (signal 6)?
- Logical XOR operator in C++?
- C++ – Decimal to binary converting
- Alternative to itoa() for converting integer to string C++?
- What does int & mean
- Evaluate a string with a switch in C++ [duplicate]
- “&” meaning after variable type
- How can I create objects while adding them into a vector?
- What is the printf format specifier for bool?
- libpng warning: iCCP: known incorrect sRGB profile
- In CLion, header only library: file “does not belong to any project target, code insight features might not work properly”
- Is a function definition not allowed here before a ‘{‘ token?
- terminate called after throwing an instance of ‘std::out_of_range’
- What does “missing template argument” mean?
- How can I convert const char* to string and then back to char*?
- How do I call the class’s destructor?
- Can’t resolve Error: indirection requires pointer operand (‘int’ invalid)
- Defining a struct in flex error C++
- C++ Postfix calculator using stacks
- LNK1168: cannot open debug\file.exe for writing
- what does “error : a nonstatic member reference must be relative to a specific object” mean?
- Can I output a one channel image acquired from camera into a winAppi window?
- Difference in make_shared and normal shared_ptr in C++
- error: passing ‘const …’ as ‘this’ argument of ‘…’ discards qualifiers
- Printing an array in C++?
- Resolve build errors due to circular dependency amongst classes
- error: “initializer expression list treated as compound expression”
- The compiler is complaining about my default parameters?
- read word by word from file in C++
- How to replace all occurrences of a character in string?
- Deleting an object in C++
- Appending a vector to a vector
- C++ Expression must have pointer-to-object type
- error C2679: binary ‘<<' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
- Multi-character constant warnings
- Error: vector does not name a type
- How to convert ASCII value into char in C++?
- How to alphabetically sort strings?
- Function definition not found for a function declared inside unnamed namespace – how to resolve? (Visual Studio 2015)
- How do I check if a C++ std::string starts with a certain string, and convert a substring to an int?
- Why can’t we pass arrays to function by value?
- Iterator Loop vs index loop
- OpenCV Error: Assertion failed (size.width>0 && size.height>0) simple code
- How can I add reflection to a C++ application?
- operator << must take exactly one argument
- Is there a C++ equivalent to getcwd?
- expected primary-expression before ‘]’ token
- What is the return type of sizeof operator?
- C++ 2d char array to string
- Error: member function may not be declared outside of its class.
- invalid use of template name without an argument list
- What is “error C2061: syntax error : identifier “?
- What is the size of sizeof(vector)? C++
- C++ – Print Out Objects From Set
- Why virtual & static keywords aren’t allowed outside class declaration?
- compare and swap vs test and set