On Wed, 24 Mar 1999, Iztok Polanic wrote:

> Hello !!!
> 
> i'm having difficulties linking a header files and source files. When I
> want to compile a program I type this:
> 
> #g++ 11.3.cpp Person.h -o bla
> g++: Compilation of header file requested
> 
> # ls -lsaF bla
> ls: bla: No such file or directory
> 
> How come that there's no executable? Here are my header and source
> files.

Because the compile failed.  Take Person.h out of the compile command
(11.3.cpp #includes it anyway, so the compiler will see it) and you will
get some nice errors you can fix.  Once you fix those, you will get an
executable that says something like this when run:

Letitia Gruntfuttock
Born: 4/1/1965
Telephone: 212 5551234

Today is 3/24/1999
Today Letitia is 33 years old.

Oh, by the way, the compiler won't catch this, but you usually want to
spell the variable in the #ifndef the same way as the one in the
#define.  Normally that construction is used to protect against defining
the same thing more than once.  I don't know c++, and I have no
desire to learn it, but a compiler is a compiler.  Want the source back
with the errors fixed?

Lawson
          >< Microsoft free environment

This mail client runs on Wine.  Your mileage may vary.





___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

Reply via email to