Thread: MinGW Problem: Why doesn't gcc work?

  1. #1
    Registered User
    Join Date
    Jul 2011
    Posts
    12

    Unhappy MinGW Problem: Why doesn't gcc work?

    I've already downloaded MinGW but when I go to command prompt and type in gcc, it says "gcc is not recognized as an internal or external command, operable program, or batch file."

    I also added "c:\mingw\bin" at the end of the path in the advanced settings.

    If if helps, there were the instructions I followed: How to install Eclipse for C++ development on Windows

    Help would be appreciated.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    If you go to c:\mingw\bin, is there a gcc.exe there?

  3. #3
    Registered User
    Join Date
    Jul 2011
    Posts
    12
    Just checked: No, it's not. How do I add it?

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    It's not so much that it needs to be exactly there; you just need to figure out where it went.

    (If push comes to shove, you can always search for it.)

    (Edit to add: Although if you have some things in c:\mingw\bin, but not everything, then that is (a) interesting and (2) a reason for you to move things around.)
    Last edited by tabstop; 07-26-2011 at 08:16 PM.

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Before you try to add it there, try and find it. Maybe it is in a different path, and hence it is that path that you should add to the system path.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #6
    Registered User
    Join Date
    Jul 2011
    Posts
    12
    It's currently searching. But I'm confused because when I installed it onto my home computer, it worked.
    I just got a new labtop and I'm trying to install it here now. Could this be a reason why? (forgot to add that before)

  7. #7
    Registered User
    Join Date
    Jul 2011
    Posts
    12
    When I searched, I typed in "gcc.exe" and it got no results.
    Was that what I'm supposed to type to search for it?
    Sorry, I'm a newbie here.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Hmm... that may imply that your MinGW installation was botched. Since you have succeeded before, perhaps you could undo and try again.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Registered User
    Join Date
    Jul 2011
    Posts
    12
    I did try again more than once but it still doesn't work..

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    So, do you have c:\mingw\bin as a directory? Do you have c:\mingw\ at all? What do you have?

  11. #11
    Registered User
    Join Date
    Jul 2011
    Posts
    12
    I'm not sure what you mean by directory but I found the MinGw file.
    Perhaps, these pictures will give better insight to my problem: MinGW Problem - a set on Flickr

  12. #12
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Okay so you have a MinGW directory. Is there anything in that directory?

  13. #13
    Registered User
    Join Date
    Jul 2011
    Posts
    12
    Yes, when I go into the MinGW folder and then click on "bin", there are many files. Could I be missing something within that file?

  14. #14
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    You know the file you're looking for here: gcc.exe. So, is there a gcc.exe file in c:\mingw\bin?

    This really isn't rocket surgery.

  15. #15
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    We like many files. I appear to have 118 in my c:\mingw\bin directory, so many files is the right thing. Now: if you look at those files, do you see gcc.exe? What about mingw32-gcc-4.5.2.exe? (Perhaps for some other value of 4.5.2.)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 12-07-2010, 06:53 AM
  2. MinGW and C++ just won't work, reports bunch of errors..
    By hauzer in forum Windows Programming
    Replies: 14
    Last Post: 05-27-2009, 11:00 AM
  3. Replies: 12
    Last Post: 06-29-2006, 11:49 AM
  4. Replies: 3
    Last Post: 05-01-2003, 12:47 PM

Tags for this Thread