From: Ajay Jain <ajay050@gmail.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: Creating archive file with main
Date: Mon, 30 May 2011 13:19:00 -0000 [thread overview]
Message-ID: <BANLkTikxzOCg4U973KBsihCKQMVxPuDa6g@mail.gmail.com> (raw)
In-Reply-To: <4DDBB3D0.5010406@redhat.com>
>> 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?
next prev parent reply other threads:[~2011-05-30 4:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 14:00 Ajay Jain
2011-05-24 13:33 ` Nick Clifton
2011-05-30 13:19 ` Ajay Jain [this message]
2011-05-31 13:27 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BANLkTikxzOCg4U973KBsihCKQMVxPuDa6g@mail.gmail.com \
--to=ajay050@gmail.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).