0

can the experts show me a few trick on getting started with c++, installing a compiler(the simpliest way pls.)

5
Contributors
10
Replies
55
Views
3 Years
Discussion Span
Last Post by taichichuan
Featured Replies
  • The de facto standard compilers for Linux are GCC (GNU Compiler Collection), which you can install if it is not pre-installed on your distro. Under Ubuntu, you can simply install "build-essential" package, which pulls in all that you need (compilers, make, auto-conf.. etc..). Other distros will have an equivalent packages. … Read More

0

I think g++ (g++ filename)is inbuilt but for starters it might be a good idea to take a look in an IDE, for example Code Blocks it is out of charge and is one of the best C++ IDEs I've came across

Edited by Slavi

1

The de facto standard compilers for Linux are GCC (GNU Compiler Collection), which you can install if it is not pre-installed on your distro. Under Ubuntu, you can simply install "build-essential" package, which pulls in all that you need (compilers, make, auto-conf.. etc..). Other distros will have an equivalent packages. If not, you can install the individual packages for GCC compilers (gcc for C, g++ for C++, gfortran, gcj for Java, etc..) and the "binutils" package as well as other useful tools like "make", "autoconf", "cmake", etc..

The other alternative compile in Linux that some distros have on their package repositories is Clang (clang, clang++, etc..) which a more modern (but less stable) replacement for GCC.

But up to here, this will only get you as far as being able to compile some code in the terminal / command-line.

To actually do some coding, you can install an IDE. There are plenty of decent IDEs for Linux and C++, like CodeBlocks, Geany, KDevelop, NetBeans, Qt Creator, etc.. which are all offered on most distro's package repositories so that you can easily install them from apt-get or yum or your software center application.

0

wow, thanks, am appreciative of the indept explaination given, fortunately for me i am in a feild that is very related to yours (Mechatronics and Robotics engineering) looking forward to communicating with you more.....

0

The one very popular IDE that Mike2K didn't mention is Eclipse which runs on just about anything. It has a C/C++ plugin which works a treat. Myself, I prefer to use a good editor and make, but for less experienced people, the tools that a good IDE provide for editing, compiling, and debugging are very valuable in getting started.

0

oh thanks for the suggestion, i got it installed on my windows but on linux it's a bit tricky....

0

ooooo thanks, i later figured it out, the gcc version and the g++ version did not correlate that was the problem i encountered but i later figured........ thanks anyways!).

Edited by yeyo_1

0

@Rubber, I have problem with Eclipse, apparently there is something wrong having Luna on debian 64 bit, they've given a solution where I had to manually change something in a file but I never found the file and gave up :( Installed windows 8 and I have to go on it everytime I code now >.>

0

If you're running any of the Debian-based distros, an "apt-get install build-essential" will install everything you need to be able to develop C/C++ code on Linux. Then make sure that you use the CDT (C/C++ developer toolkit) version of Luna rather than the Java version to be able to find the compiler for native compliation in Eclipse.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.