Find the answer to your Linux question:
Results 1 to 6 of 6
Hello 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++ ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    6

    Teach me how to master C++ programming in Linux/ubuntu..


    Hello

    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

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Alrighty then.

    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.

  3. #3
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Ubuntu...Well I'd check this out also.

    GTK+ - About
    Make mine Arch Linux

  4. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,598
    Have a look at this
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  5. #5
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Quote Originally Posted by elija View Post
    Have a look at this
    Ha, ha...Those steps are listed in the appendices, in a very small font...
    Make mine Arch Linux

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,633
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •