Mail Archives: djgpp/1996/07/21/03:04:04
Xref: | news2.mv.net comp.os.msdos.djgpp:6204
|
From: | Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: How do I create my own libraries ?
|
Date: | Fri, 19 Jul 1996 08:52:50 +0100
|
Organization: | Lehrstuhl fuer Stroemungsmechanik
|
Lines: | 42
|
Message-ID: | <31EF3ED2.167E@LSTM.Ruhr-UNI-Bochum.De>
|
References: | <jnt7xg8CV84b091yn AT sn DOT no>
|
NNTP-Posting-Host: | bvb.lstm.ruhr-uni-bochum.de
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Arne Knut Roev wrote:
>
> No, I am not working on a new libc. I am simply writing a number of
> more or less useless ;-) functions, and I would like to add them to
> a library of my own.
>
> How do I do this, using djgpp ver. 2.0 ?
>
> ( And, while we are at it, how do I use the library, once I have
> created it ?)
>
> I have tried to find this info in the info-files, and in the FAQs,
> but so far I have not been able to locate any relevant info.
>
> BTW: I'm talking C, _not_ C++.
From the top of my head:
ar -svr libfoo.a m1.o m2.o m3.o
Put libfoo.a into the lib directory, if it's needed often.
Say
gcc -o bar.exe bar.c -lfoo
to link it in.
Or put libfoo.a wherever you want and say
gcc -L/wherever/you/want -o bar.exe bar.c -lfoo
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -