Mail Archives: djgpp/1997/02/02/03:14:53
On 2 Feb 1997, Anne Compton, David/Andrew Gasson wrote:
>
>
> Eolo Perfido <eolop AT mbox DOT vol DOT it> wrote in article
> <32f253f2 DOT 517889 AT news DOT flashnet DOT it>...
> > Compiling this incredible stupid code (i'm learning):
> >
> > #include <iostream.h>
> > #include <stdlib.h>
> >
> >
> > 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
- Raw text -