Installing GNU C++ compiler under Windows 7

Discussion in 'C++' started by Swifty, Feb 25, 2013.

  1. Swifty

    Swifty Guest

    I bought "C++ Primer Fifth Edition" as an introduction to C++. It says
    that it used the GNU C++ compiler mostly. Can that be installed under
    Windows 7?

    I did a brief search, but everything that talked about binaries or
    downloading just gave links to other pages which talked about something
    else.

    I'm getting the feeling that I'm in one of those situations "I wouldn't
    start from here if I were you".

    --
    Steve Swift
    http://www.swiftys.org.uk/
    Swifty, Feb 25, 2013
    #1
    1. Advertising

  2. Swifty

    Nobody Guest

    On Mon, 25 Feb 2013 17:08:52 +0000, Swifty wrote:

    > I bought "C++ Primer Fifth Edition" as an introduction to C++. It says
    > that it used the GNU C++ compiler mostly. Can that be installed under
    > Windows 7?


    Yes. The usual source for gcc (and other GNU programming tools) for
    Windows is MinGW:

    http://www.mingw.org/
    Nobody, Feb 25, 2013
    #2
    1. Advertising

  3. Swifty

    Jorgen Grahn Guest

    On Mon, 2013-02-25, Swifty wrote:
    > I bought "C++ Primer Fifth Edition" as an introduction to C++. It says
    > that it used the GNU C++ compiler mostly. Can that be installed under
    > Windows 7?


    A book cannot use a compiler.

    It seems (Amazon preview; Preface; A Note about Compilers) they
    mention gcc 4.7 as a compiler which implements most of C++11.

    Is that what you're looking for -- a C++11 compiler for Windows?
    Or a free C++98 compiler for Windows? The answers to those questions
    may be different from those of the question you ask.

    (I'm no use in that area -- I'm on Linux and a happy user GCC there.)

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Feb 25, 2013
    #3
  4. Swifty

    Swifty Guest

    On 25/02/2013 20:04, Jorgen Grahn wrote:
    > Is that what you're looking for -- a C++11 compiler for Windows?
    > Or a free C++98 compiler for Windows?


    I was looking for a C++11 compiler for Windows only because it was
    mentioned in the book that I have.

    I don't know enough about C++ to know what I want/need.

    --
    Steve Swift
    http://www.swiftys.org.uk/
    Swifty, Feb 25, 2013
    #4
  5. Swifty

    Swifty Guest

    On 25/02/2013 17:26, Nobody wrote:
    > The usual source for gcc (and other GNU programming tools) for
    > Windows is MinGW


    Thanks. I'll take a look at that in the morning.

    --
    Steve Swift
    http://www.swiftys.org.uk/
    Swifty, Feb 25, 2013
    #5
  6. >"Swifty" wrote in message news:kgg5r1$33h$...
    >I bought "C++ Primer Fifth Edition" as an introduction to C++. It says that
    >it used the GNU C++ compiler mostly. Can that be installed under Windows 7?
    >
    >I did a brief search, but everything that talked about binaries or
    >downloading just gave links to other pages which talked about something
    >else.
    >
    >I'm getting the feeling that I'm in one of those situations "I wouldn't
    >start from here if I were you".
    >
    >--
    >Steve Swift
    >http://www.swiftys.org.uk/


    Hi Steve,

    you can also install and use Microsoft Visual Studio C++ Express or if you
    want the feeling of GNU C++, try Codeblocks for Windows.

    Cheers,
    Hans-Peter
    Hans-Peter Rampp, Feb 26, 2013
    #6
  7. Swifty

    Swifty Guest

    On 26/02/2013 07:18, Hans-Peter Rampp wrote:
    > you can also install and use Microsoft Visual Studio C++ Express


    That was my original intention. My purpose is to find a GUI program
    development environment (I used to use VisProRexx by Hockware).

    I tried VisualBasic, but never found a reference for the flavour of
    "Basic" that was involved, so I couldn't easily define the behaviours.

    So I decided to try something else in my retirement, and C++ came onto
    the scene.

    Perhaps I'll just try Visual C++ to see how I get on. Thank you.

    --
    Steve Swift
    http://www.swiftys.org.uk/
    Swifty, Feb 26, 2013
    #7
  8. Swifty

    Jorgen Grahn Guest

    On Mon, 2013-02-25, Swifty wrote:
    > On 25/02/2013 20:04, Jorgen Grahn wrote:
    >> Is that what you're looking for -- a C++11 compiler for Windows?
    >> Or a free C++98 compiler for Windows?

    >
    > I was looking for a C++11 compiler for Windows only because it was
    > mentioned in the book that I have.
    >
    > I don't know enough about C++ to know what I want/need.


    Ok. Well, as I see it a newbie definitely needs at least a C++98
    compiler. I hear that there are freeware versions of Microsoft's
    compiler, but don't know how they compare to MinGW.

    C++11 /is/ an improvement on C++98 and it's good that your book
    covers it, but IMHO it's not a big handicap for you to start out with
    C++98.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Feb 26, 2013
    #8
  9. Swifty

    Swifty Guest

    On 26/02/2013 20:48, Andy Champ wrote:
    > ICBW but I don't believe MS's compiler is fully C++11 compliant.


    In my case, C++11 is almost certainly beside the point.

    Starting from wanting to be able to generate GUI applications (again), I
    decided to try my hand at C++, remembered that I got nowhere with
    VisualBasic (because I didn't understand the variant of Basic in
    VisualStudio), so decided to buy the C++ Primer.

    This is where things started to go strange. I bought a used book from
    Abebooks, but it got lost in the post. So I tried again, and this time
    got a newer version of the book, which incorporated C++11. So, needing a
    compiler to try the samples in the book, I went looking for GNU GCC as
    mentioned in the book.

    In truth, I will probably not get much further in C++ than stuff you
    could do equally well in Basic; my skills are diminishing.

    Perhaps I asked the wrong questions. I suspect I should have asked for a
    beginner's C++ book with less than 300 pages. That might keep it within
    my capabilities, and my attention span! (Based on my Kernighan & Ritchie
    "C", under 300, and my REXX Language, under 200)

    --
    Steve Swift
    http://www.swiftys.org.uk/
    Swifty, Feb 27, 2013
    #9
  10. Swifty

    Öö Tiib Guest

    On Tuesday, 26 February 2013 09:43:23 UTC+2, Swifty wrote:
    > On 26/02/2013 07:18, Hans-Peter Rampp wrote:
    > > you can also install and use Microsoft Visual Studio C++ Express

    >
    > That was my original intention. My purpose is to find a GUI program
    > development environment (I used to use VisProRexx by Hockware).
    >
    > I tried VisualBasic, but never found a reference for the flavour of
    > "Basic" that was involved, so I couldn't easily define the behaviours.
    >
    > So I decided to try something else in my retirement, and C++ came onto
    > the scene.
    >
    > Perhaps I'll just try Visual C++ to see how I get on. Thank you.


    That freeware "Visual Studio" is lie. It does not offer much if you
    want to make GUI programming in C++.

    For GUI programming in C++ it is better to download QT (there is version
    for VS2010 and MinGW 4.7 if you target Windows).

    QT comes with endless pile of examples and that QT creator has far
    nicer GUI designer than MS has ever made for C++. Also it is non-hanging
    and non-crashing (unlike MS IDEs).

    QT as framework is somewhat less heavy on templates than the general
    trend is and that might be good if you plan to not get deep with C++.
    Öö Tiib, Feb 27, 2013
    #10
  11. Swifty

    Guest

    On Tuesday, February 26, 2013 2:48:41 PM UTC-6, Andy Champ wrote:
    > On 26/02/2013 09:03, Jorgen Grahn wrote:
    >
    > > Ok. Well, as I see it a newbie definitely needs at least a C++98

    >
    > > compiler. I hear that there are freeware versions of Microsoft's

    >
    > > compiler, but don't know how they compare to MinGW.

    >
    > >

    >
    > > C++11/is/ an improvement on C++98 and it's good that your book

    >
    > > covers it, but IMHO it's not a big handicap for you to start out with

    >
    > > C++98.

    >
    >
    >
    > ICBW but I don't believe MS's compiler is fully C++11 compliant. Whether
    >
    > that matters or not, and whether GCC is any better I don't know.
    >
    >
    >
    > Andy


    http://msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx < VC's C++ 11 state.

    Microsoft has a complete c++ 11 compliant standard library -- including threading though with lacking true variadic template support, and lacking initilizer list constructors (compiler support has not caught up enough yet).

    GCC 4.7 implements nearly all of the standard, lacking memory model and related features, which causes the libstd to suffer from lack of threading support.

    C++ 11 is still in flux, everyone's still trying to catch up. Though the catching up is moving WAY faster than the c++ 98 adoption did.

    For the OP's question though, he's really looking more for an IDE, visual studio 2012 desktop would work, or if he's really needing gcc, QtCreator for windows comes with MinGw(GCC 4.7).
    , Feb 28, 2013
    #11
  12. Swifty

    Guest

    Am Montag, 25. Februar 2013 18:26:43 UTC+1 schrieb Nobody:
    > On Mon, 25 Feb 2013 17:08:52 +0000, Swifty wrote: > I bought "C++ Primer Fifth Edition" as an introduction to C++. It says > that it used the GNU C++ compiler mostly. Can that be installed under > Windows 7? Yes. The usual source for gcc (and other GNU programming tools) for Windows is MinGW: http://www.mingw.org/


    As you are using Windows7 I would suggest to start with Visual C++ Express.You get a decent editor, an easy to use debugger and a good help system (MSDN). That's great for a beginner (C++ newbie)

    I myself did also install mingw. But just because Microsoft C++ only has about 50% of the new C++11 stuff. And I am only using GNU C++ for things not (yet) supported by MS.

    Again: I am not saying which compiler is better. I am just talking about the ease of usage. As a beginner you will use like only 10% of C++ anyway...
    , Feb 28, 2013
    #12
  13. Swifty

    Swifty Guest

    On 28/02/2013 14:33, wrote:
    > As a beginner you will use like only 10% of C++ anyway...


    If I ever make it that far! The language I've been using for the last 35
    years is defined in a book of 299 pages (including the index). My C++
    primer is 900+ pages, so I'll almost certainly fall short of 30% of it.

    --
    Steve Swift
    http://www.swiftys.org.uk/
    Swifty, Feb 28, 2013
    #13
  14. Swifty

    Jorgen Grahn Guest

    On Thu, 2013-02-28, wrote:

    > As you are using Windows7 I would suggest to start with Visual C++
    > Express. You get a decent editor, an easy to use debugger and a good
    > help system (MSDN). That's great for a beginner (C++ newbie) >

    ....
    > Again: I am not saying which compiler is better. I am just talking
    > about the ease of usage.


    Ease of use is debatable too -- force me to use such an environment
    and you'd see my productivity drop like a stone. The compiler itself
    matters little, though.

    > As a beginner you will use like only 10% of
    > C++ anyway...


    If the implication is (and it probably isn't) that 90% of C++ is more
    or less experts-only, then I disagree. There are a few rarely-useful
    corners and some cruft left over from C, but most of it is relevant
    much of the time.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Mar 5, 2013
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter

    1 day gnu, whole life gnu?

    Peter, Jan 10, 2005, in forum: Java
    Replies:
    3
    Views:
    320
    John C. Bollinger
    Jan 10, 2005
  2. Peter
    Replies:
    17
    Views:
    583
    Chris Smith
    Jan 13, 2005
  3. Markus Elfring
    Replies:
    2
    Views:
    351
    Markus Elfring
    Feb 23, 2005
  4. Matt

    Installing the GNU C Library in Windows

    Matt, Jul 14, 2007, in forum: C Programming
    Replies:
    11
    Views:
    871
    Mark McIntyre
    Jul 15, 2007
  5. Replies:
    6
    Views:
    383
    Jorgen Grahn
    Mar 13, 2010
Loading...

Share This Page