Installing GNU C++ compiler under Windows 7

S

Swifty

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".
 
J

Jorgen Grahn

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
 
S

Swifty

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.
 
H

Hans-Peter Rampp

"Swifty" wrote in message news:[email protected]...
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".

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
 
S

Swifty

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.
 
J

Jorgen Grahn

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
 
S

Swifty

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)
 
Ö

Öö Tiib

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++.
 
K

kd.boss

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).
 
B

bob

Am Montag, 25. Februar 2013 18:26:43 UTC+1 schrieb Nobody: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...
 
S

Swifty

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.
 
J

Jorgen Grahn

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top