www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/02/03:14:53

Date: Sun, 2 Feb 1997 03:01:27 -0500 (EST)
From: Michael Phelps <morphine AT hops DOT cs DOT jhu DOT edu>
To: "Anne Compton, David/Andrew Gasson" <brainstorm AT lightspeed DOT bc DOT ca>
cc: djgpp AT delorie DOT com
Subject: Re: What is happening ?????
In-Reply-To: <01bc10c4$155d4600$30520cce@Pbrainstorm.lightspeed.bc.ca>
Message-ID: <Pine.GSO.3.95.970202030043.24151B-100000@hops.cs.jhu.edu>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019