gcc

This is a discussion on gcc within the A Brief History of Cprogramming.com forums, part of the Community Boards category; okay...how the freakin heck do you install GCC....and what files do i download? I need GCC because I have a ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    Question gcc

    okay...how the freakin heck do you install GCC....and what files do i download?

    I need GCC because I have a programming contest coming up this Saturday...and all of our C++ programs have to be able to compile for GCC.

    Of course I am running Windows XP, and GCC is for Linux.

    So my friend tells me, "oh get Cygwin, it comes with gcc built in."

    So I get Cygwin. Does it have gcc built in? NO.

    And the GCC website is just confusing....

    grrr
    My Website

    "Circular logic is good because it is."

  2. #2
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    Hey there, I don't have the asnwer to your exact question, but I might hae another solution. If you are a university student why not just SSH/Telnet into the schools main or CS only network; both schould have g++. I don't think many high schools (at least in my area) offer this option, it would be pretty cool if they did though!

    hope this helps,

    axon

    EDIT:: I just looked at your "school notes" site, and I see that you are indeed in high school, so the above will most likely not help you. Sorry.
    Last edited by axon; 10-20-2003 at 12:20 AM.

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  3. #3
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    actually i am in college...that school notes site is from last year.
    My Website

    "Circular logic is good because it is."

  4. #4
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    in that case, couldn't you simply log into your schools network and use the g++ compiler there?

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  5. #5
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    www.mingw.org

    GCC for windows. Or get the installer here

  6. #6
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Good luck with your comp this weekend, my ACM comp is this weekend as well. Where are your regionals at? If they are Colorado Springs early November, then we might bump into each other, although I'd be surprised if Texas didn't host it's own regional.

    I was in the same boat as you, everything needs to be gcc and I've only used MSVC++ my entire life. Right now I'm writing everything in MSVC++ and ftping it to my school account which has g++. Much easier then using pico or emacs in my opinion.

  7. #7
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    well I am going to college at BYU in Utah...so we might bump into each other sometime.

    Yeah all I have ever used is Borland and MSVC, so gcc is something new.

    I downloaded MingW like Brian said and tried to compile the following program:

    Code:
    #include <iostream.h>
    #include <conio.h>
    
    int main ( void )
    {
       cout << "Hello, World!";
       getch();
       return 0;
    }

    It would not compile! So then I added this line above main:

    using namespace std;

    it still would not compile. so then i changed the cout to this:

    std::cout << "Hello, World!";

    and it still would not compile! so i got frustrated and now I have resolved to use printf instead, haha.
    My Website

    "Circular logic is good because it is."

  8. #8
    Registered User
    Join Date
    Oct 2003
    Posts
    49
    gcc invokes the c compiler by default.
    g++ invokes the c++ compiler.

    So you have to type "g++ <source>" and not "gcc <source>" .

    Also the ANSI C++ Standard says it should be #include <iostream> without .h

  9. #9
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    On my schools sun system network, the g++ compiler uses standard conventions, ie. <iostream> without the .h, and using namespace std; what command are you using to compile? are you going straight to the executable or are you making an a.out>?

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

  10. #10
    Board Conservative UnregdRegd's Avatar
    Join Date
    Jul 2003
    Posts
    154
    Bloodshed Dev-C++ should do the trick. It includes MinGW.
    I am a programmer. My first duty is to God, then to nation, then to employer, then to family, then to friends, then to computer, and finally to myself. I code with dignity, honor, and integrity.

  11. #11
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    Cygwin doesnt come with gcc "built in", but it gives you the option to install it (along with many many other things). After you download the web install program you have a list of things to include in your installation. You just have to find gcc and anything else you might want. gcc is under the "Devel" subsection (took me a long time to find it).
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  12. #12
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    g++ works.

    how do you get gcc to do a c++ compile?
    My Website

    "Circular logic is good because it is."

  13. #13
    Registered User
    Join Date
    Oct 2003
    Posts
    49
    Why do want to invoke a c++ compilation with gcc?
    gcc.exe is not the compiler. It's just a wrapper application that calls the compiler.
    If you want to use the c++ compiler start it with g++.exe.

  14. #14
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002
    Posts
    455
    cygwin does have it, you just have to choose it in the packages it installs

    and mingw, just extract the /bin folder included with mingw into the /bin folder in cygwin. thats how i did it

    i recomment you use a makefile and use make.exe to build the whole thing. works pretty nicely imo

    (make is included with mingw)
    Last edited by the Wookie; 10-21-2003 at 05:09 PM.

  15. #15
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    BTW, conio.h isn't standard and isn't guaranteed to work.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Gcc can't find obvious copy constructor
    By SevenThunders in forum C++ Programming
    Replies: 13
    Last Post: 03-19-2009, 03:41 PM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 10:38 AM
  3. Replies: 4
    Last Post: 09-02-2007, 09:47 PM
  4. Compiles on gcc 3.3 but not on gcc 4.0.3
    By cunnus88 in forum C++ Programming
    Replies: 5
    Last Post: 03-29-2007, 01:24 PM
  5. Mixing gcc 2.9* with gcc 3.*
    By rotis23 in forum Linux Programming
    Replies: 1
    Last Post: 07-19-2003, 01:21 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21