Tag Info

New answers tagged

0

Although this is a couple months old, if you did want g++ --version to output 5.1 follow these instructions: How do I use the latest gcc (hint: symlinks)


0

You can retrieve a precompiled version with static-get static-get -x coreutils


1

Programs like as and ld are part of the GNU binutils package. The package management system will install this automatically as a dependency of the compiler: if you have installed build-essential there should be nothing extra you need to do. This assumes you are referring to the native GNU compiler toolchain: things may be different if you are referring to ...


1

You don't need g++ to compile c++ programs if you have a set of c++ libs. Installed use the proper library flags. Say we want to use gnu's stdc++: gcc -o target source.cpp -L/usr/lib/architecture & distro dependent/ -lstdc++ and for a long time the guiding people of GNU/Linux where c oriented so until some what recently distros had to package a c ...


5

You will need something that can compile C++ files. The two main compilers in Linux are GCC and Clang. GCC is the default compiler in Ubuntu. GCC isn't installed by default because not everyone needs to compile a file. GCC is typically only used by developers. However, you can easily install it by installing the build-essential package, which is a ...


1

Found out how to fix this: add the following to my .pro file: linux-g++ | linux-g++-64 | linux-g++-32 { QMAKE_CXX = g++-4.8 QMAKE_CC = gcc-4.8 }


1

You're possibly missing g++ package on your machine. Open a terminal and install it using the below command: sudo apt-get install g++ To compile using g++ use this g++ -o test.o test.cpp g++ can be used to compile C++ source, the default ubuntu installation comes with gcc, but not with g++. You are trying to compile C++ source using a C ...


2

cc1plus is the c++ backend (real compiler) for gcc, if you are primarily going to program in c++ you will really want to install g++ (will have cc1plus with it). Using one the package system front ends apt-get, synaptic, software manager, or a number of others it will install the dependencies with it. execvp is a programming function, the file you found ...


2

looks like to need to install the stdc++ dev files sudo apt-get install libstdc++-4.8-dev then to compile the code g++ -o execname ./sourcefile.cpp -std=c++11


0

In GCC 5.1.0, the best method so far is to install it somewhere else with DESTDIR and then use that to decide which files were generated, as mentioned at: http://stackoverflow.com/a/25304014/895245 Although there is no top-level uninstall target, some directories do have it, in particular gcc, so you can do: cd build/gcc sudo make uninstall This does not ...


2

There is nothing wrong with your code, but the auto specifier is present since c++11 version of the standard of C++ programming language. You must use g++ -std=c++11 a.cpp to compile your code.


1

Try this: export PATH+=:/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1/bin Also, you should consider adding it to .bashrc if you want to make it a part of $PATH every time you open a terminal.


1

You need to include the folders where commands can be found in the PATH environment variable. So it sounds like your PATH environment variable is missing the /usr/bin entry. What is the output of echo $PATH for your system? The default for Ubuntu 14.04 is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games and you can ...



Top 50 recent answers are included