Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Nov 2009
Teach me how to master C++ programming in Linux/ubuntu..
I'm a very good Java and c++ developer under windows, very good java developer under linux. However, I need to start C++ programming under ubuntu linux. I master C++ so all I need is a tutorial, tips or introduction to how to immigrate to linux. I don't need tutorial to C++, I need a tutorial to which editor is the best, how to compile and run C++ code. That is it...
Thanks on advance
First of all, under Linux, we have the GNU C Library (glibc), which provides a number of UNIX/Linux-specific C functions. As you know, C functions can be used in C++ also, so these are the functions that you will use a lot to do low-level Linux programming. The documentation for glibc is available at:
The GNU C Library
As for tools under Linux, our C++ compiler is part of gcc (GNU Compiler Collection), which includes a lot of different compilers. You will want to use the command "g++" to compile C++ programs. You can run the "man g++" command from the terminal to get more information, or you can Google for some more information.
This is great if you're working from the commandline. If you are using the commandline, you'll want a good programmer's text editor. The two most popular by far are Vim and Emacs: they have completely different editing styles, but you should check both out. They have very steep learning curves, but mastering one will make you very productive.
If you'd prefer an IDE, Eclipse has a C++ plugin which may be good, or you can use an IDE like Anjuta (Gnome) or KDevelop (KDE).
In any case, you'll also want to look up configure scripts and Makefiles. We use these to distribute software. When you install Linux software from source, you usually run the command "./configure", which figures out aspects of the system, then run the command "make" which actually does the compilation. You can use the autoconf and automake programs to generate these automatically.
I hope that helps.
09-12-2010 #3Make mine Arch Linux
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
C++ is C++, unless it is Microsoft Visual C++, in which case it is sort of, but not quite standard C++. The only things you are going to need to really concern yourself with are the system C API functions. Remember, there is no COM or ActiveX in Linux, so all the COM interfaces won't be there, which is only a problem if you want to write code that plays nice on both Linux and Windows. I've had to do that, configure C++ libraries for Unix/Linux that would be compiled with COM interfaces when built on Windows so our C++ libraries of code could be run from VB and C#, etc. A true PITA, and an exercise in foolishness I HOPE I never have to repeat! So, consider C++ on Linux more of a purist's C++ environment. The current state of the GNU compiler suites are very strongly standards-compliant. Much more so than the MS varients.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!