[Gllug] c++ newbie complier probs

Sean Burlington sean at uncertainty.org.uk
Tue Oct 22 20:59:01 UTC 2002


>
>
> 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
>

hmm..

but the employee class won't compile on its own

it doesn't have the line
using namespace std;

I discovered this earlier when I forgot to include the employees clas 
*after* using namespace std;

but I thought g++ could compile and link in one go... thus saving me 
from doing it manually.

I'm doing this as part of a comp sci MSc (just started) and we are 
supposed to use borlands command line compilier which I have tried and 
get pretty much the same error message.

The course doesn't expect much previous experience so I would expect 
this to be something fairly straightforward (either a bug in my code or 
badly setup compiler)

Sean





-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list