This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Configuring and Compiling GCC for Windows


I've been working sort of behind the scenes with Mark, and I have been
trying to direct him as to how I have been building 3.x series gcc.
Simple stuff, no cross compilers, just a configure I knew worked for
Win 9X, 200,MP, make bootstrap and make.

This afternoon, I woke from my sub-moronic stupor to ask myself (and
him) why are we doing this.  Cygwin comes with 2.95.3.  It can be
installed as part of the Cygwin setup program.  If its not, then
you have to go down through to the development category and click
the right boxes.  Nothing to build.  It works.  Period.  At this
point, you should be able to compile and run "hello world" in three
languages, C, C++ and f77. 

My advice is this:
(1) Clean out and re-install Cygwin.
(2) Make sure that when you install, you go through all the categories
    and make sure you install everything.  Even the games (I know this
    is stupid and anal retentive, but I don't want anything important
    missed here)
(3) Do a gcc -v, it should look something like mine:

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)

 (4) Write a simple "hello world" program in C of C++ or f77, pick
     your favorite.  I'm going to assume you name it hello.cpp

 (5) Compile via
     gcc -0 hello hello.cpp
     from within Cygwin

 (6) You should have hello.exe.  If you don't, or if you get an error
     in the process, you probably have a problem with your install.
     If it compiles, type ./hello

Now, community, I'm a little torn.  I almost suggested that he use vi
as his editor, but that approach is not smart to place on a Unix newbie.
I am a little concerned, as I have run into occasional problems myself
with using something like notepad to write / modify things in Cygwin.
Sometimes I run into line ending problems.  Suggestions from the greater
community?

Please note that you HAVE to have a working version of gcc if you want
to later build 3.0x or 3.1.  I wouldn't do that yet.  Have fun with
what you have.  Learn the joys of pipes and grep.  Hell, I made a job
a career by knowing how to use grep to find stuff in code.  Its FUN.
(Why do I sound like a dieing Jim Kirk in Generations when I say that)

Mark, I am sorry.  I listened to you, but I didn't really listen to what
you were doing and think about what you should be doing well enough.
I know better than that.  To know better, and still do something wrong
that confuses someone else is just plain stupid on my part.

Wayne Keen






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]