1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

how to build GCC on windows

Discussion in 'Software Development' started by deepbluegene, Jan 29, 2007.

Thread Status:
Not open for further replies.
Advertisement
  1. deepbluegene

    deepbluegene Thread Starter

    Joined:
    Jan 29, 2007
    Messages:
    19
    hi

    i am using cygwin and g++ version is 3.4.4.3 but i want to updrade it to 4.1.1
    how i can do this.
    before posting here i downloaded gcc4.1.1 from http://gcc.gnu.org/gcc-4.1/

    and copied to local directory and directed cygwin to llok for files in that directory.it gave me option to upgrade to 4.1.1 from 3.4.4.3 but after running setup i checked the version and it was same old gcc. i ran setup again with same procedure and not there was no gcc/g++.

    is there any guide to build gcc on cygwin or how to upgrade gcc on cygwin.

    please help
    thanx
     
  2. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi deepbluegene,

    Welcome to TSG!

    Gcc builds in a very standard way in all environments.

    First, the setup, as you call it, consists of actually running the script named configure which adjusts the scripts to build gcc con your computer by detecting what libraries and header files are present. Note: you may have to set some environment variables.

    Next, it is usually just a matter of running the command: make
    which should default to "make all". There may be an additional "make install" command necessary to install the build after it is compiled and linked without errors. Note: gcc is usually installed in /usr/bin directory (in Unix/Linux), but may be different in Cygwin.

    Read the INSTALLATION file for information on building and installing the release. In the Cygwin environment, run the gcc info command: info gcc
    in order to get more information.

    -- Tom
     
  3. deepbluegene

    deepbluegene Thread Starter

    Joined:
    Jan 29, 2007
    Messages:
    19
    thanx for reply.

    the steps i am doing are

    1. download gcc core.tar.bz2 and gcc-g++.tar.bz2.
    2. create dir gcccompile
    3. extract gcccore and gccg++ in gcccompile/gcc4/
    4.after extraction there is directory gcc-4.1.1
    5. change directory 'cd gcc-4.1.1'
    6. run './configure'
    7. 'make'
    8. 'make install'

    everything runs fine till the step 8 "make install"
    at this step there is some error. i will run the whole procedure again will let you know about the error.

    if i am doing anything wrong in the above steps please help me in right direction.

    my frustration level is rising by minute that i can not even compile gcc.

    please help.
    thanx
     
  4. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    If no errors occurred with the "make" command, then you have completed the compilation. Waiting for your error log on "make install".

    -- Tom
     
  5. deepbluegene

    deepbluegene Thread Starter

    Joined:
    Jan 29, 2007
    Messages:
    19
    sorry for late reply but now i have dropped the idea of building gcc/g++ on cygwin for a while.currently i am using ubuntu and using gcc shipped with it. i was not comfortable with the command line options i have to give to build gcc because i did not knew what is the purpose of them.

    now i am learning new things daily and hopefully within short time i will understand the complexity behind building from source and how to configure for one's requirement.

    i will come back here if i face any problem.

    thanx for your help.
     
  6. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi deepbluegene,

    Its easy to configure gcc for your machine, just run the configure script via the command line: ./configure
    Then run: make
    and then run: make install
    as you have already posted.

    Do you mean to say you have unique requirements no one else has on your platform? What are they?

    -- Tom
     
  7. deepbluegene

    deepbluegene Thread Starter

    Joined:
    Jan 29, 2007
    Messages:
    19
    no i do not have unique requirements. i tried building other programs from source in ubuntu and they worked very well. only gcc in cygwin is giving problem.i do not know why. at this stage i do not need it. i am using it on ubuntu.

    but thanx for your prompt reply.
     
  8. Shadow2531

    Shadow2531

    Joined:
    Apr 30, 2001
    Messages:
    2,636
    There's a mingw distro that uses GCC 4.1.2.
    http://nuwen.net/mingw.html

    It's not cygwin, but if you need a build environment that can ./configure stuff, you can use MSYS from mingw.org with it.

    That distro of mingw comes with the boost library with its libs already built. It also comes with libsdl etc.
     
  9. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/539251

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice