[Gllug] c++ newbie complier probs
Sean Burlington
sean at uncertainty.org.uk
Tue Oct 22 21:11:59 UTC 2002
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>
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
More information about the GLLUG
mailing list