Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
Hi Just joined this great forum and my first question is for the C++ nas C# programers. What is the best available compiler for C++ on linux plarforms. What do ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    5

    Best compiler


    Hi

    Just joined this great forum and my first question is for the C++ nas C# programers.

    What is the best available compiler for C++ on linux plarforms. What do u guys use and prefer?

    Thanx for help.

  2. #2
    Linux User
    Join Date
    May 2005
    Posts
    473
    move this topic to... oh...Linux Programming & Scripting

  3. #3
    Linux User
    Join Date
    Nov 2003
    Location
    Brooklyn, NY
    Posts
    347
    GCC.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User eugrus's Avatar
    Join Date
    Dec 2004
    Location
    Russia
    Posts
    391
    GCC is included to nearly all distros and is used to compile nearly all software you use.

  6. #5
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by a12ctic
    move this topic to... oh...Linux Programming & Scripting
    Done. And I also recommend using GCC/G++/GCJ. They come with just about every Linux distribution and they work just fine. They're also ANSI standards compliant, so your code should be portable to other X86 operating systems, if you're even worried about that. Haha.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  7. #6
    Linux User nalg0rath's Avatar
    Join Date
    Sep 2004
    Location
    Stockholm
    Posts
    303
    If you're really concerned with preformance you can use the Intel C++ compiler, it does not work with every program or processor but sometimes you can get a little preformance boost. Personally I think the preformance boost is insignificant so I use GCC.

  8. #7
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    Just a note on the 'current' gcc.

    As a bleeding edger, I am quick to want to jump on the 4.0 release (especialy with all the talk about an optimized optimizing archetecture) but keep in mind that in in its current state, all that optimizing archetecture is more the framework for a truly blazing complier in a year or so. right now, 4.0 will probably take a little performance hit. In short, if you are developing, it might be fun to try, but for your distrobution binaries, its probably better to stick with the 3.* series for a good while.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  9. #8
    Just Joined!
    Join Date
    Jun 2005
    Posts
    5
    thanx for help guys. I am trying to compile my C++ program - a program that only prints Hello World on the screen - but i get errors.

    there are no errors in the program , as i copied it letter for letter. I selected the installation of gcc when i was installing Red Hat.

    DO i need to do anythng else before i start compiling?

  10. #9
    Linux User GNU_man's Avatar
    Join Date
    Apr 2005
    Location
    Canada, eh
    Posts
    284
    Quote Originally Posted by Mr.Smith
    thanx for help guys. I am trying to compile my C++ program - a program that only prints Hello World on the screen - but i get errors.

    there are no errors in the program , as i copied it letter for letter. I selected the installation of gcc when i was installing Red Hat.

    DO i need to do anythng else before i start compiling?
    What were the errors you got?

    it should work with:
    Code:
    gcc hello.c -o hello
    That should compile & link. then just type
    Code:
    ./hello
    (whatever the name of your program is)
    PTL x10 Hallelujah!
    AMD Athlon XP 2600+ 512MB RAM Dual 80G WD HD 8MB Cache (1 WinXP Home, 1 CentOS 4.2) GeForce Ti4200 128MB SB Live! 5.1
    Registered Linux user #391521

  11. #10
    Linux Engineer Giro's Avatar
    Join Date
    Jul 2003
    Location
    England
    Posts
    1,219
    I have never compiled a C++ prog with gcc its
    Code:
    g++ -o myBinary mySource.cpp

Page 1 of 2 1 2 LastLast

Posting Permissions

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