[prog] C++ loader error

Sue Stones suzo at bigpond.net.au
Fri May 30 15:07:28 EST 2003


I have written a class heirarcy, and have dealt with complile time errors.  
But now I am getting a loader error.  I don't know where to look to lllok for 
errors.   All files are in the current directory (which is in $PATH).

Any sugestions?   Below are the error message, the makefile, and  main.C
as I assume that these are the most likely places for the error to occur.

thanks sue


_________the beginning of the error messages ________
$ make
g++    -c -o main.o main.C
ld -o firm main.o Firm.o Employee.o Manager.o \
     Clerk.o Salesperson.o SalesRecord.o
ld: warning: cannot find entry symbol _start; defaulting to 08048080
main.o: In function `main':
main.o(.text+0x9f): undefined reference to `__rethrow'


_______the makefile_________
main: main.o Firm.o Employee.o Manager.o \
             Clerk.o Salesperson.o SalesRecord.o
        ld -o firm main.o Firm.o Employee.o Manager.o \
             Clerk.o Salesperson.o SalesRecord.o

myCompany.o: main.C
        g++ -c main.C

Firm.o: Firm.C
        g++ -c Firm.C

Employee.o: Employee.C
        g++ -c Employee.C

Manager.o: Manager.C
        g++ -c Manager.C

Clerk.o: Clerk.C
        g++ -c Clerk.C

Salesperson.o: Salesperson.C
        g++ -c Salesperson.C

SalesRecord.o: SalesRecord.C
        g++ -c SalesRecord.C

__________main.C_______

/************************************************
 *
 *      main is a client to test the Firm
 *      class.
 *
 ***********************************************/

#include "Firm.h"
#include "Employee.h"
#include "Manager.h"

int main(void)
{
        Firm andCo = Firm();
        Manager smith = Manager("Smith",1, 350000);

        andCo.add((smith));
        return 0;
}//main
~
~


More information about the Programming mailing list