PDA

View Full Version : gcc



DavidP
10-19-2003, 10:31 PM
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

axon
10-19-2003, 11:17 PM
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.

DavidP
10-19-2003, 11:22 PM
actually i am in college...that school notes site is from last year.

axon
10-20-2003, 12:10 AM
in that case, couldn't you simply log into your schools network and use the g++ compiler there?

Brian
10-20-2003, 12:12 AM
www.mingw.org

GCC for windows. Or get the installer here (http://sourceforge.net/forum/forum.php?forum_id=310799)

PJYelton
10-20-2003, 08:45 AM
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.

DavidP
10-20-2003, 01:06 PM
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:



#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.

DrZoidberg
10-20-2003, 01:13 PM
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

axon
10-20-2003, 01:32 PM
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>?

UnregdRegd
10-20-2003, 02:41 PM
Bloodshed Dev-C++ should do the trick. It includes MinGW.

*ClownPimp*
10-20-2003, 10:30 PM
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).

DavidP
10-21-2003, 01:29 AM
g++ works.

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

DrZoidberg
10-21-2003, 11:35 AM
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.

the Wookie
10-21-2003, 01:26 PM
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)

golfinguy4
10-21-2003, 05:24 PM
BTW, conio.h isn't standard and isn't guaranteed to work.

TravisS
10-22-2003, 12:16 AM
Heh, funny, I had nearly the exact same issue yesterday :p

The company I work for has been developing it's own version of Linux... one that runs on Windows (called LOW, Linux On Windows). At it's heart, it's a slim and trim Debian install. Does not come with GCC (or many other things, 35 MB download) so I had to install it. I found the best, and easiest way, to install it was to use your version of Linux's package installer. RPM's for redhad, .deb for debian, etc... makes the install quite easy.

To install GCC (3.3.2.) you kinda already need a compiler, because it comes only as binaries needing to use the configure - make install method (at least the version I found) :eek:

Took me a good 3-4 hours to finally get the stupid thing working. Good luck :D

axon
10-22-2003, 12:24 AM
Originally posted by TravisS
Heh, funny, I had nearly the exact same issue yesterday :p

The company I work for has been developing it's own version of Linux... one that runs on Windows (called LOW, Linux On Windows). At it's heart, it's a slim and trim Debian install.

hey travis, is it possible to connect via LOW to another network and display xwindows applications?

TravisS
10-22-2003, 12:30 AM
In theory... yes. Because as of right now the only way to run XWindows through LOW is with the use of VNC...

I personally haven't tried it yet though, my exposure to the program is somewhat limited. I've only been in testing for 2 weeks now, and working with LOW for a bit over a week.

axon
10-22-2003, 01:31 AM
I'm looking for some software that could do that. I'm running XP on my loptop, and I need an easy access to XWin apps from my school. I downloaded Exceed 9.0 from Humingbird but it is a biziatch to use. Some applications ran through exceed work very slow on DSL/Calble, and are impossible to use on dialup...I wonder why....anyways, when is LOW to be released? will it be free?

Brian
10-22-2003, 01:58 AM
Originally posted by axon
I'm looking for some software that could do that. I'm running XP on my loptop, and I need an easy access to XWin apps from my school. I downloaded Exceed 9.0 from Humingbird but it is a biziatch to use. Some applications ran through exceed work very slow on DSL/Calble, and are impossible to use on dialup...I wonder why....anyways, when is LOW to be released? will it be free?

I though X was only really tolerable over a LAN. That's what I heard, at least.

TravisS
10-22-2003, 12:35 PM
To the best of my knowledge LOW will always be free. There has been no talk of it being a paid for app, so hopefully that will remain the way it is even when it's finally released.

It can be downloaded at www.penguindows.com in it's current Beta status. A couple words of warning however.

#1 It will run REALLLLLY slow on a 9X machine unless you have a real beast of a computer, and it's still quite buggy. I test on a 550 MHz Athlon and quite frankly, it's nearly unbearable to work with. The install alone can take upwards of 30 minutes. If you run 2000/XP it's much much better. My 550 acts totally different with this version :)

#2 The dowload will actually download a bare-bones version of the eAnthology manager. From here Penguindows (LOW) is downloaded, and should start pretty much automatically. It's 33 MB so it will take some time, even on DSL/Cable. There isn't any progress bar yet (well, 9x has one XP is buggy) so you'll just kinda have to wait :) Installation will start when it's done downloading.

#3 Penguindows can be run without eAnthology manager. Quite frankly, I reccomend it. Unistalling eAnthology on my machine broke Penguindows temporarily, but it can be reinstalled by itself. There should be an MSI file in the penguindows install directory.

If for whatever reason you can't seem to get the eAnthology manager off your computer (for some reason occasionally the unistall gets broken) then there is a forcefull unistaller here:
http://www.buttonware.net/pub/download/qa/AllUninst.com

You might want to try the forcefull unistaller first. It may not break Penguindows, but I'm not positive on that.

axon
10-22-2003, 03:46 PM
Originally posted by Brian
I though X was only really tolerable over a LAN. That's what I heard, at least.

I thought so as well, and so did my professor. But I desperatelly needed to use tkgate, which is only available on XWin...I looked around the net and found Exceed (http://www.hummingbird.com). TKGate works slower through exceed via cable, than at school via lan...but it is bearable.