[Gllug] c++ newbie complier probs
Walid Shaari
walid at melinux.com
Tue Oct 22 21:28:28 UTC 2002
On Tue, 2002-10-22 at 22:11, Sean Burlington wrote:
> Pete Ryland wrote:
>
> > On Tue, Oct 22, 2002 at 09:36:32PM +0100, Sean Burlington wrote:
> >
> > >Pete Ryland wrote:
> > >
> > >>These are linker errors. Add a "-c" to your g++ line to just compile to
> > >>a .o file instead.
> > >
> > >It does complie without error if I do that
> > >
> > >I kind of wanted an executable though ...
> > >
> > >is there either a way of running a .o file (sounds unlikely - but I am
> > >new to creating these things) - or am I doing something wrong which is
> > >causing the linker errors ?
> >
> >
> > Ah, then you will need to link all the .o files together. Doing something
> > like:
> >
> > g++ -o myprogname module1.o module2.o module3.o
> >
> > should work if you aren't using any external libraries (besides std ones).
> >
> > You will need to link in the .o for the employee class to avoid the error
> > you were getting before.
> >
> > hth,
> > Pete
> >
> argghhhh!!!!!!!!!1
>
>
> spotted my dumb mistake !!!!
>
>
> should have done
> #include <ccc_empl.cpp>
I would not follow that style for naming a header file, its better to
stick to standard naming conventions (.h), check that article for
similar problems
http://www.gamedev.net/reference/programming/features/orgfiles/default.asp
>
> instead of
>
> #include <ccc_empl.h>
>
>
> c++ errors eem so much more cryptic than perl,php or java errors :(
>
> (maybe its just that I haven't learned the quirks yet :)
>
> Sean
>
>
> --
> Gllug mailing list - Gllug at linux.co.uk
> http://list.ftech.net/mailman/listinfo/gllug
>
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list