This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Creating archive file with main
>> 1) I have a framework which includes a main and multiple 'c' files. I
>> need to export this framework to other sub-modules. Could I make an
>> archive (.a) which includes the main?
>
> Yes you can.
But when I combine this archive (which now has a main) with another
archive and then hope to create an executable out of it, the linker
starts cribbing.
i.e. gcc 1.a 2.a -o out
where 1.a has main complains of undefined references to crt.o
What is the missing link?