Date: Sun, 2 Feb 1997 03:01:27 -0500 (EST) From: Michael Phelps To: "Anne Compton, David/Andrew Gasson" cc: djgpp AT delorie DOT com Subject: Re: What is happening ????? In-Reply-To: <01bc10c4$155d4600$30520cce@Pbrainstorm.lightspeed.bc.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 2 Feb 1997, Anne Compton, David/Andrew Gasson wrote: > > > Eolo Perfido wrote in article > <32f253f2 DOT 517889 AT news DOT flashnet DOT it>... > > Compiling this incredible stupid code (i'm learning): > > > > #include > > #include > > > > > > main () > > { > > > > cout << "eolo"; > > > > return 0; > > > > } > > > > > > I receive this error.... > > > > I compile.... > > > > c:\develop\bin>gcc a1.cc -o a1.exe -lm (compiling command, is it > > ok??) > > > > and then.... > > > > c:/develop/tmp\ccdaaaaa(.text+0x16):a1.cc: undefined reference to > > 'cout' > > c:/develop/tmp\ccdaaaaa(.text+x1b):a1.cc: undefined reference to > > 'ostream:operator (((char const *)' > > > > c:\develop\bin> > > > Eolo, > I'm learning, too, and I had the same exact problem. This is how I got > around it (but it probably isn't the only way or the best way :-) ) First, > create an object file by doing something like > gcc -c a1.cc > then change the object file into an exe by typing > gxx -o a1.exe a1.o > Probably, there is a way to do this in one step--perhaps somebody else > knows? Hope this works, simple: gxx a1.cc -o a1.exe > David Gasson > ---Michael Phelps morphine AT cs DOT jhu DOT edu CH3 | N / | ______/ | / \ CH2 _____/ \__|__ // \\ / | \\ // \\______/___CH2 \\ \ / \ / \______/ \_____/ / ------ \ / \ OH \ / OH O Morphine