From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Mills To: 'eCos Discussion' Cc: John Mills Subject: [ECOS] Library Circularity Question Date: Wed, 07 Jul 1999 15:34:00 -0000 Message-id: X-SW-Source: 1999-07/msg00006.html I ran into something I don't understand while linking a "toy" C++ example as a sh-elf executable. I am using sh-hms libraries built out of 'ecosSWtools-990319', and targeting the Hitachi EDK7045F development board. Originally I provided a dummy 'delete' operator to satisfy linkage of a pro-forma C++ destructor. The problem came up when I tried to find a linkage sequence which would actually implement some dynamic storage allocation and deallocation. Linking with "-lgcc" [from "/lib/gcc-lib/sh-hms/2.9-ecosSWtools-990310/libgcc.a"] left unresolved symbols; adding a trailing link command "-lc" didn't resolve all; but adding a _second_ "-lgcc" after "-lc" resolved all symbols: $(XLD) $(LDFLAGS) -o $@ ${OBJS} -lgcc -lc -lgcc Any suggestions what is happening here? Thanks - John Mills, Sr. Software Engineer TGA Technologies, Inc. 100 Pinnacle Way, Suite 140 Norcross, GA 30071-3633 e-mail: jmills@tga.com Phone: 770-421-2100 ext.124 (voice) 770-449-7740 (FAX)