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

samuelmaskell

Android Enthusiast
May 11, 2009
293
3
Victoria,BC
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
 
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?
 
Upvote 0
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 ...
 
Upvote 0
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.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones