How to install c++ on Windows

M

Marcelo

Hi,

I am having some problems while installing c++ on Windows.
I have tried with
http://www.mingw.org

in order to use g++ in my system.
The main problem is that the g++ over the command line doesn't find the
libraries as
stdio.h

can you help me?

thanks a lot,

MArcelo
 
G

Guest

Marcelo said:
Hi,

I am having some problems while installing c++ on Windows.
I have tried with
http://www.mingw.org

This group is about C++ _language_, not about it's compilers and
implementations so this is off-topic

But,

1. you might want to get devcpp (google, first link) it contains mingw
(easy to install) and it provides IDE (with editor and so on)

2. in free time, why not get a real operating system that includes g++
compiler by default - go to https://shipit.ubuntu.com/ and you will
redive 100% free (even without costs of transport) a CD (or serveral of
them - give to friends) with linux (ubuntu distribution). It is quite
easy to use by newbies. Although this IS an operating system, so
installing it requires time and free hard disc partition or better yet a
separate hard disc.
 
T

TB

Rafał Maj Raf256 sade:
This group is about C++ _language_, not about it's compilers and
implementations so this is off-topic

But,

1. you might want to get devcpp (google, first link) it contains mingw
(easy to install) and it provides IDE (with editor and so on)

2. in free time, why not get a real operating system that includes g++
compiler by default - go to https://shipit.ubuntu.com/ and you will
redive 100% free (even without costs of transport) a CD (or serveral of
them - give to friends) with linux (ubuntu distribution). It is quite
easy to use by newbies. Although this IS an operating system, so
installing it requires time and free hard disc partition or better yet a
separate hard disc.

Oh god, I hate blunt ignorant os advocacy. That obnoxious comment
doesn't actually help the OP if it's windows he wants to develop on.
Please leave out item 2 in future posts, this is not
comp.os.linux.advocacy.
 
R

Roland Pibinger

I am having some problems while installing c++ on Windows.
I have tried with http://www.mingw.org
in order to use g++ in my system.
The main problem is that the g++ over the command line doesn't find the
libraries as stdio.h

can you help me?

MingW has a confusing distribution system. If you are a beginner you
may look at MinGW Developer Studio (simple VC++6-like IDE + MingW g++
3.4.2).

Best wishes,
Roland Pibinger
 
C

C.B.

Look at http://www.sgi.com/tech/stl/ where you can download the STL library
and stdlib also (so, stdio.h). try the link : IOstreams
library(experimental). (why experimental, I don't know ...)

Don't forget when you compile to indicate g++ the paths of the include
directories (using -I"/include/directory") and the lib directory.

But it would be easier to use dev-cpp, or Visual C++ Express edition (which
is free, you just havec to register with an passport / hotmail e-mail
account) : http://msdn.microsoft.com/vstudio/express/visualc/.
 
G

Guest

TB said:
Please leave out item 2 in future posts, this is not
comp.os.linux.advocacy.

Threfore I dont write WHY linux IS better, only suggested an option to
get a nice c++ compiler built into the system.
 
J

John Carson

Rafal Maj Raf256 said:
Threfore I dont write WHY linux IS better, only suggested an option to
get a nice c++ compiler built into the system.


The OP asked about installing a compiler for Windows. You advised him to
install Linux ("a real operating system"). There could hardly be a clearer
case of gratuitous Linux advocacy.
 
S

Shark

Rafal said:
Threfore I dont write WHY linux IS better, only suggested an option to

haha, bias detected. A more politically correct statement: "_Threfore_
I dont write WHY linux IS better or worse"
 
S

Shark

C.B. said:
Look at http://www.sgi.com/tech/stl/ where you can download the STL library
and stdlib also (so, stdio.h). try the link : IOstreams
library(experimental). (why experimental, I don't know ...)

Don't forget when you compile to indicate g++ the paths of the include
directories (using -I"/include/directory") and the lib directory.

But it would be easier to use dev-cpp, or Visual C++ Express edition (which
is free, you just havec to register with an passport / hotmail e-mail
account) : http://msdn.microsoft.com/vstudio/express/visualc/.

I used the free command line tools. A year or two ago I read that
Borland was the most standard conforming compiler (not sure if it is
still true or not). Aside from standard C++, windows programming is
more hardcore with Borland than it is with dev studio so if you wanna
become a windows geek you should use it :) Check it out:
http://www.borland.com/downloads/download_cbuilder.html
 
J

Jerry Coffin

Shark wrote:

[ ... ]
I used the free command line tools. A year or two ago I read that
Borland was the most standard conforming compiler (not sure if it is
still true or not).

It wasn't true a year ago, and it still isn't. I'm reasonably certain
the closest to perfect conformance is from the Comeau compiler. Intel's
compiler is also very close (and, not coincidentally, based on the same
front-end).

The OP hasn't said whether he's only interested in free tools -- both
Comeau and Intel cost money (though Comeau is quite inexpensive).
Incidentally, Comeau's compiler is purely a front-end, so you need some
other compiler to generate code -- but all the usual compilers for
Windows qualify. For free tools, the Borland ones aren't bad. Then
again, I think Microsoft's free tools are better -- while Microsoft had
serious conformance issues for a while, those are mostly a thing of the
past. IME, the Microsoft compiler generally has better optimization as
well (though I suppose that's only borderline topical). As has been
mentioned elsethread, there are several different distributions of gcc
for Windows, but the Bloodshed IDE is almost certainly the easiest to
get installed and operational.
 
M

Martin Mayer

I use Visual Studio and I think if you'll want to become a good
developer, its really recommended to get Visual Studio. For starting
you can use a Compiler liek g++ or DevC++.
 
R

roberts.noah

TB said:
Oh god, I hate blunt ignorant os advocacy. That obnoxious comment
doesn't actually help the OP if it's windows he wants to develop on.
Please leave out item 2 in future posts, this is not
comp.os.linux.advocacy.

That obnoxious comment doesn't help the OP either. Your post is
totally off topic. This isn't alt.flame.
 
B

Ben Pope

That obnoxious comment doesn't help the OP either. Your post is
totally off topic. This isn't alt.flame.

and so on... ad infinitum.

Probably best to leave it at that.

Ben Pope
 
C

C.B.

Jerry said:
Incidentally, Comeau's compiler is purely a front-end, so you need some
other compiler to generate code -- but all the usual compilers for
Windows qualify.

What do you mean by "Comeau's compiler is purely a front-end" ? For me a
front-end is like a GUI or something. A compiler produces code, or it isn't
a compiler, is it ?
 
I

Ian Collins

C.B. said:
Jerry Coffin wrote:




What do you mean by "Comeau's compiler is purely a front-end" ? For me a
front-end is like a GUI or something. A compiler produces code, or it isn't
a compiler, is it ?

It can produce something (which could be C) for a back end to turn into
assembler. Most compilers use at least two parts, a platform
independent front end and a platform (but not necessarily language)
specific back end.

The first C++ compilers where front ends (cfront) to C compilers.
 
B

Ben Radford

Marcelo said:
Hi,

I am having some problems while installing c++ on Windows.
I have tried with
http://www.mingw.org

in order to use g++ in my system.
The main problem is that the g++ over the command line doesn't find the
libraries as
stdio.h

can you help me?

thanks a lot,

MArcelo

Try using Dev-Cpp (http://www.bloodshed.net/devcpp.html). It's an IDE
that uses MinGW/GCC as it's compiler and should work right out of the
box. If you really want to use C++ from the command line try using the
-I parameter to include the folder that the standard library headers are
in. Something like:

$ g++ -I/usr/include hw.cpp -o hw

Substituting /usr/include for the standard header path on your Windows
system. Once you get it working you can dump it all into a make file.

Regards
 

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,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top