-
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
-
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.
-
actually i am in college...that school notes site is from last year.
-
in that case, couldn't you simply log into your schools network and use the g++ compiler there?
-
www.mingw.org
GCC for windows. Or get the installer here
-
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.
-
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.
-
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
-
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>?
-
Bloodshed Dev-C++ should do the trick. It includes MinGW.
-
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).
-
g++ works.
how do you get gcc to do a c++ compile?
-
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.
-
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)
-
BTW, conio.h isn't standard and isn't guaranteed to work.