www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/05/08:42:35

Newsgroups: comp.os.msdos.djgpp
From: fredex AT fcshome DOT stoneham DOT ma DOT us
Subject: Re: non-standard name libs
Organization: Absolutely None!
Message-ID: <E0B6Hq.8vJ@fcshome.stoneham.ma.us>
References: <327bacb4 DOT 30207215 AT news DOT redestb DOT es>
Date: Sun, 3 Nov 1996 19:08:13 GMT
Lines: 33
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Apparently-To: djgpp AT delorie DOT com

HiGhLaNDeR (highlander AT redestb DOT es) wrote:
> Hi there:

> 	I was reading the docs until i couldn't do it more and i
> didn't found how to build a library. I saw something like the "ar"
> program but i'm not sure.


You would CREATE your own lib file like this:

	ar <options> <library name> <obj1.o> <obj2.o> ... <objn.o>

e.g.

	ar rvs mylib.lib a.o b.o c.o d.o

> 	Also it's very important for me to have one library with a non
> standard "lib----.a" name, for example i want to link a library called
> "mylib.lib". How i can do this from rhide and from the command line?

And you would build a program that USES the contents of that library
like this:

	cc -o progname progname.c ./mylib.lib

Fred
-- 
-------------------------------------------------------------------------------
 .----    Fred Smith    /                        Office: fred AT computrition DOT com 
( /__  ,__.   __   __ /  __   : /                                 508-663-2524 
 /    /  /   /__) /  /  /__) .+'           Home: fredex AT fcshome DOT stoneham DOT ma DOT us 
/    /  (__ (___ (__(_ (___ / :__                                 617-438-5471 
-------------------------------- Jude 1:24,25 ---------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019