public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] how to link sevral *.o file into one *.o?
@ 2002-10-29 10:45 Schumacher, Gordon
  0 siblings, 0 replies; 3+ messages in thread
From: Schumacher, Gordon @ 2002-10-29 10:45 UTC (permalink / raw)
  To: '? ?', 'ecos-discuss@sources.redhat.com'

Why do you want them in a .o file?  Are you trying to link them (i.e., into
an executable or binary image)?
.o files are "object" files - you can't actually do much with them, other
than link them into an executable.
If you really want to do that, for some reason, instead of calling "gcc foo.
c -o foo.o" and then "gcc bar.c -o bar.o", try "gcc foo.c bar.c -o foo.o".
I'm not at all clear that this will actually work, though.

If you're after an executable, you probably want "gcc foo.o bar.o -o
myapp.out", or some such.
For a library, you want to use libtool - there's a multitude of options
you're going to want to look at.

I'd suggest that you look at the GNU documentation for these tools.
GCC: http://gcc.gnu.org/onlinedocs
libtool:
http://www.gnu.org/manual/libtool-1.4.2/html_chapter/libtool_toc.html

If you have further questions, feel free to e-mail me (but I think that this
is kind of out of the scope of the eCos list.)

# -----Original Message-----
# From: johnsonest@hotmail.com [mailto:johnsonest@hotmail.com]
# Sent: Monday, October 28, 2002 10:58 PM
# To: ecos-discuss@sources.redhat.com
# Subject: [ECOS] how to link sevral *.o file into one *.o?
# 
# 
# 
# Hi,all.
#      Assume I have a.o,b.o,c.o,d.o,....
# Now I want to get a whole.o
# 
# bash>gcc ....?
# conditions: maybe functions in a.o will call functions in 
# b.o,c.o,...etc.
# question:
# 
# 1.how to use a(b,c,d,...).o to get the whole.o?
# 
# 2.how to use a(b,c,d,...)>o to get a lib(eg. libwhole.a)?
# 
# could you help me?
# THANK YOU VERY MUCH!
# BRS/johnsonest
# 
# _________________________________________________________________
# 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/lccn/

# 
# 
# -- 
# Before posting, please read the FAQ: 
# http://sources.redhat.com/fom/ecos
# and search the list archive: http://sources.redhat.com/ml/ecos-discuss
# 

--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] how to link sevral *.o file into one *.o?
  2002-10-28 21:58 张 亮
@ 2002-10-29 11:58 ` max
  0 siblings, 0 replies; 3+ messages in thread
From: max @ 2002-10-29 11:58 UTC (permalink / raw)
  To: johnsonest, ecos-discuss

-r -o whole.o
--- &#34847; &#51339; <johnsonest@hotmail.com> wrote:
> 
> Hi,all.
>      Assume I have a.o,b.o,c.o,d.o,....
> Now I want to get a whole.o
> 
> bash>gcc ....?
> conditions: maybe functions in a.o will call
> functions in b.o,c.o,...etc.
> question:
> 
> 1.how to use a(b,c,d,...).o to get the whole.o?
> 
> 2.how to use a(b,c,d,...)>o to get a lib(eg.
> libwhole.a)?
> 
> could you help me?
> THANK YOU VERY MUCH!
> BRS/johnsonest
> 
>
_________________________________________________________________
>
&#23429;&#51244;&#49369;&#46056;&#53769;&#22530;&#50165;&#63753;&#49829;&#51649;&#65292;&#54749;&#36040;&#30192;
MSN Messenger:
> http://messenger.msn.com/lccn/ 
> 
> 
> -- 
> Before posting, please read the FAQ:
> http://sources.redhat.com/fom/ecos
> and search the list archive:
> http://sources.redhat.com/ml/ecos-discuss
> 


__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] how to link sevral *.o file into one *.o?
@ 2002-10-28 21:58 张 亮
  2002-10-29 11:58 ` max
  0 siblings, 1 reply; 3+ messages in thread
From: 张 亮 @ 2002-10-28 21:58 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312; format=flowed, Size: 661 bytes --]


Hi,all.
     Assume I have a.o,b.o,c.o,d.o,....
Now I want to get a whole.o

bash>gcc ....?
conditions: maybe functions in a.o will call functions in b.o,c.o,...etc.
question:

1.how to use a(b,c,d,...).o to get the whole.o?

2.how to use a(b,c,d,...)>o to get a lib(eg. libwhole.a)?

could you help me?
THANK YOU VERY MUCH!
BRS/johnsonest

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/lccn/ 


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-10-29 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-29 10:45 [ECOS] how to link sevral *.o file into one *.o? Schumacher, Gordon
  -- strict thread matches above, loose matches on Subject: below --
2002-10-28 21:58 张 亮
2002-10-29 11:58 ` max

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).