Find the answer to your Linux question:
Results 1 to 8 of 8
Hi People .. Does anybody know of a good c++ compiler for ubuntu that will compile code intended to run in windows (.exe) .. ??...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    4

    Question C++ compiler


    Hi People ..

    Does anybody know of a good c++ compiler for ubuntu that will compile code intended to run in windows (.exe) .. ??

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496
    Quote Originally Posted by zero-cool View Post
    Hi People ..

    Does anybody know of a good c++ compiler for ubuntu that will compile code intended to run in windows (.exe) .. ??
    The most common compiler in Linux is the GNU C compiler (gcc). There is also a GNU C++ compiler (g++). I do not know if you can compile it with a Windows machine as its target however. I would recommend doing that on a Windows machine proper.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  3. #3
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    The GNU Compiler Collection is capable of cross compiling, but you should use its sister project, the MinGW, as it was tuned for Windows development and ships with all necessary header files for WinAPI and whatnot.
    MinGW cross compiler for Linux build environment | MinGW
    Debian GNU/Linux -- You know you want it.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! KPolulak's Avatar
    Join Date
    Feb 2009
    Location
    New Jersey, USA
    Posts
    42
    I was asking myself the same question not too long ago and, yes, G++ is what you're gonna need. You can find out about it here. To install it, simply run:

    "sudo apt-get install g++"

    It's good to see there's other fellow C++ programmers on the board here. I'm still a bit of a noob though...

  6. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    C Compiler and other necessary packages required to complie are available in meta-package build-essential.
    Code:
    sudo apt-get clean all
    sudo apt-get update
    sudo apt-get install build-essential
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #6
    Just Joined! KPolulak's Avatar
    Join Date
    Feb 2009
    Location
    New Jersey, USA
    Posts
    42
    Hey devils casper, a few questions...

    What's a meta package and what is the "build essential" package used for?
    What does the "clean all" command do?


  8. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    sudo apt-get clean all command removes all cached packages and free up Hard disk space.
    meta-package contains a list of packages only. If you install any meta package, it will pull all listed packages.
    build-essential meta package has list of compilers and packages necessary for compilation.
    Another example of meta package is ubuntu-desktop. Its pretty small in size but pull off complete Gnome Desktop Environment.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Just Joined!
    Join Date
    Feb 2009
    Posts
    4

    Wink

    thanks everyone

Posting Permissions

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