• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

WinGW

samuelmaskell

Android Enthusiast
Hello,
This is a pretty specific problem so I doubt anyone will have any answer but.. I can hope. I'm posting this in a bunch of the forums I go on for that reason. Anyway, I just started a BEng program 2 weeks ago and I would like to be able to test the C programs that I write for computer science without having to go to the lab. Sounds easy but apparently isn't. In the lab we are using WinGW to compile our programs. I tried installing this and I thought everything went fine but when I try to compile something I just get
Code:
'gcc' is not recognized as an internal or external command, operable program or batch file.
I followed the exact same steps that I used in the lab and I have tried it on both 64bit Windows 7 and 32bit Vista. However, in the lab we were using XP. I don't know if this could be the problem or not. I believe some of the other students have gotten it to work on Vista though. I don't know what I'm doing wrong. Do I have to somehow make it so that WinGW is running? I don't see anything about that. Perhaps I could try to use I different compiler but I would like to be able to use this so that everything is the same as in the lab.

Thanks for your help,
Samuel Maskell
 
This is a pretty daft counter-question, but you do have gcc installed, right? It's not a standard Windows component, so you should 'know' if you have it.

The gcc web site mentions MinGW, and you mention WinGW; I don't know if they are the same, related, or one a component of the other.
 
yes, it is part of WinGW. However I searched WinGW's site for "gcc" and it came up with "how to intall the MinGW (GCC) compiler suite".
it says,
"Download MinGW automated installer from Browse MinGW - Minimalist GNU for Windows Files on SourceForge.net Run it and choose options as per needed. It would install everything right. Then add C:\MinGW\bin to you PATH variable."


I had already done everything except the last sentence. What does "The add C:\MinGW\bin to your PATH variable" mean?
If I go into that folder I see a "gcc.exe" but that doesn't help me. What is a PATH variable?
 
yes, it is part of WinGW. However I searched WinGW's site for "gcc" and it came up with "how to intall the MinGW (GCC) compiler suite".
it says,
"Download MinGW automated installer from Browse MinGW - Minimalist GNU for Windows Files on SourceForge.net Run it and choose options as per needed. It would install everything right. Then add C:\MinGW\bin to you PATH variable."


I had already done everything except the last sentence. What does "The add C:\MinGW\bin to your PATH variable" mean?
If I go into that folder I see a "gcc.exe" but that doesn't help me. What is a PATH variable?


- On Windows, right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add the full path to the gcc.exe/ directory to the path.


This will make the gcc.exe usuable on the computer no matter what directory you are in ...
 
wow.. that was an probably exactly the answer I was looking for. However, it STILL doesn't seem to be working.. I have no idea why. But thank you for your help anyway. I really appreciate your being so precise.

Samuel Maskell
 
wow.. that was an probably exactly the answer I was looking for. However, it STILL doesn't seem to be working.. I have no idea why. But thank you for your help anyway. I really appreciate your being so precise.

Samuel Maskell


NP, sorry you still have the other problem ...
 
I ended up just using devc++ which includes MinGW. It works fine. I still have no idea what my problem was.. anyway, since I got a compiler to work, I finished my assignment the day that it was assigned even though we have a week to do it =]

once again, thanks for your help
 
To add a path, you need to make sure you put a semicolon to separate it. Also, you want to use the system path and not the user path. Typically, you just go to the end, type a semicolon, then give it the path. For instance, your path may be
c:\windows\system32;c:\windows
you would change it to
c:\windows\system32;c:\windows;C:\MinGW\bin

Double-check it to make sure you have the semicolon there or the last path you have on the line may not work.
 
Back
Top Bottom