What do i use to write programs in Windows?

W

Weasel

What do i use to compile , and basically program in windows? Since at
home i use linux, but at school they dont have linux... what can i use?
 
M

Matthias Kaeppler

Weasel said:
What do i use to compile , and basically program in windows? Since at
home i use linux, but at school they dont have linux... what can i use?

Text editor, compiler suite (e.g. www.mingw.org), build system (I think
'make' comes with mingw32).
 
S

savagesmc

If you are used to linux, then cygwin is your best option. It provides
a very functional set of the same development tools that you get with
linux - gcc/g++, sed, awk, perl, python, make, autoconf, automake,
etc..... The website for cygwin was already given in this thread.

However, if you want to write "windows" programs, microsoft has their
compiler available for free download:
http://msdn.microsoft.com/visualc/vctoolkit2003/

Good luck, and have fun.

Steve
 
A

Alf P. Steinbach

* Weasel:
What do i use to compile , and basically program in windows? Since at
home i use linux, but at school they dont have linux... what can i use?

Many others have suggested CygWin, but although it's a great command
interpreter environment you have to bend backwards to produce Windows
programs.

All that work has been done for you, by the MingW folks, so if you're
considering CygWin, use MingW instead (and CygWin as an extra Unix-like
command interpreter if you like).

For links to the above plus other compilers and documentation etc., see
<url:
http://home.no.net/dubjai/win32cpptut/html/w32cpptut_01_01_02.html>.
 
S

savagesmc

I think that Alf guy is misleading the original poster by telling him
that you can't write c++ programs in cygwin, and that MingW what he
must use. Cygwin is much more than just a unix-like command
interpreter, it comes with a compiler, linker, and all the other stuff
you need to compile and run ansi compilant (or close to it) c++
programs. It has a fairly posix compilant pthreads library for
mutlithreaded applications, and it has a sockets library so you can
write networking applications if you want. If you install the X11
option, you can even compile and run X11 based graphics applications in
cygwin.

What I think Alf was trying to say is that out of the box, programs
compiled in cygwin require the cygwin dynamic link library in order to
execute. This is no problem if you are just running on the same pc
that you compiled on - you already have the dll installed just to be
able to use the cygwin tools. If you want to deliver that software to
someone, they'll need the same version of cygwin.dll that was used when
compiling the program. Not really applicable to this thread, because
the poster indicated he just wants to be able to work on homework at
home.

While MingW may also work for a lot of things - probably homework
included, my experience is that you get a much more complete
development environment when you use cygwin.

But do whatever you want, either tool MingW or Cygwin will probably
work for what you are doing. Just don't believe the post that says you
can't compile and run your programs in cygwin.
 
M

Mike Wahler

savagesmc said:
I think that Alf guy is misleading the original poster by telling him
that you can't write c++ programs in cygwin,

Where in his message did he say that?
and that MingW what he
must use.

Where in his message did he say that?
Cygwin is much more than just a unix-like command
interpreter,

Alf never claimed otherwise.
it comes with a compiler, linker, and all the other stuff
you need to compile and run ansi compilant (or close to it) c++
programs.

Alf never claimed otherwise.
It has a fairly posix compilant pthreads library for
mutlithreaded applications, and it has a sockets library so you can
write networking applications if you want. If you install the X11
option, you can even compile and run X11 based graphics applications in
cygwin.

None of those features are applicable to standard C++, the
topic of this newsgrop.
What I think Alf was trying to say is that out of the box, programs
compiled in cygwin require the cygwin dynamic link library in order to
execute.

No he didn't, and no they don't.
This is no problem if you are just running on the same pc
that you compiled on - you already have the dll installed just to be
able to use the cygwin tools. If you want to deliver that software to
someone, they'll need the same version of cygwin.dll that was used when
compiling the program. Not really applicable to this thread, because
the poster indicated he just wants to be able to work on homework at
home.

And Cygwin, among many other possiblities, can provide
that.
While MingW may also work for a lot of things - probably homework
included, my experience is that you get a much more complete
development environment when you use cygwin.

Not necessarily. It depends upon what you're developing.

But do whatever you want, either tool MingW or Cygwin will probably
work for what you are doing. Just don't believe the post that says you
can't compile and run your programs in cygwin.

Alf did not post such a claim.

-Mike
 
B

ben

Weasel said:
What do i use to compile , and basically program in windows? Since at
home i use linux, but at school they dont have linux... what can i use?

If you are a restricted user on your school computer systems then you
are unlikely to be able to install anything. Talk to your admin or just
have a look at what they have already. I remember once I had to use
notepad to edit source and send it over telnet to my home to compile,
then retrieve the program via ftp, very unpleasant experience.

Ben
 
W

Weasel

Hey, my high school computers are restricted, some websites are
blocked, you cant download at all and you cant install at all... do you
think it would work if ia sked to admin to install or download a
compiler on just my computer?
 
?

=?ISO-8859-15?Q?Juli=E1n?= Albo

Weasel said:
Hey, my high school computers are restricted, some websites are
blocked, you cant download at all and you cant install at all... do you
think it would work if ia sked to admin to install or download a
compiler on just my computer?

It can work much better that if you don't ask.
 
M

mlimber

Weasel said:
Hey, my high school computers are restricted, some websites are
blocked, you cant download at all and you cant install at all... do you
think it would work if ia sked to admin to install or download a
compiler on just my computer?

Ask your admin. S/he should be able to get one of the free tools
mentioned and install it without a problem. It could be done locally or
on the network and would work either place. It seems that you're pretty
much at mercy of your admin.

Cheers! --M
 
E

Eckhard Lehmann

savagesmc said:
I think that Alf guy is misleading the original poster by telling him
that you can't write c++ programs in cygwin, and that MingW what he
must use. Cygwin is much more than just a unix-like command
interpreter, it comes with a compiler, linker, and all the other stuff
you need to compile and run ansi compilant (or close to it) c++

As does MingW/MsysDTK.
programs. It has a fairly posix compilant pthreads library for
mutlithreaded applications, and it has a sockets library so you can
write networking applications if you want. If you install the X11
option, you can even compile and run X11 based graphics applications in
cygwin.

And have a complete different environment within your windows
environment, on the cost of an emulation layer between them.
MingW is more windows friendly while being an almost complete unix-ish
environment - not any worse than Cygwin.
A difference is, that it wraps the microsoft libc implementation and
other things, rather than adding a runtime emulation layer. However,
much of MingW would not have been possible without the work put into cygwin.
While MingW may also work for a lot of things - probably homework
included, my experience is that you get a much more complete
development environment when you use cygwin.

I use MinGW, and I use it not for homework. It does not only work for a
lot of things, it also works for more things better than Cygwin, without
violating the rest of the system. And it is also fairly complete.
Windows became my friend with MinGW ;-). Not my best friend, but anyhow...


Eckhard
 
E

Eckhard Lehmann

Weasel said:
Hey, my high school computers are restricted, some websites are
blocked, you cant download at all and you cant install at all... do you
think it would work if ia sked to admin to install or download a
compiler on just my computer?

You should honestly talk to your admin. If that does not help, talk to
the teacher of your programming course and tell him that he should talk
to the admin..


Eckhard
 
E

Ed Jensen

Alf P. Steinbach said:
Many others have suggested CygWin, but although it's a great command
interpreter environment you have to bend backwards to produce Windows
programs.

You can compile Windows programs pretty easily with Cygwin. Just
invoke g++ with the -mwindows option. If you don't want your program
to use anything from Cygwin, invoke it with the -mno-cygwin option.

For example:
g++ -o foo.exe -mwindows -mno-cygwin foo.cpp

AFAIK, this will produce foo.exe which should run on Windows-based PCs
without Cygwin installed.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top