Bernard Mentink <[email protected]> writes:

> [BRM:C/QF/MSP430] brm% msp430-ar rcv *.o
> msp430-ar: Cplus.o: File format not recognized

You (and Dmitry) missed to name the archive:

   $ msp430-ar rcv libfoo.a x.o y.o z.o

Typically, you then run msp430-ranlib on the resulting archive. See
the manual for more info:

  http://sources.redhat.com/binutils/docs-2.12/binutils.info/ar.html


This archive can then be linked to a program using:

   msp430-gcc -o prog.elf other1.o other2.o -lfoo


> Is there a special way to compile the object files for inclusion in
> a library perhaps?

No, this is not necessary.


Regards,
   --Daniel


Reply via email to