www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/02/14:05:26

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What are Libraries?
Date: Wed, 02 Jul 1997 19:06:25 +0100
Organization: Lehrstuhl fuer Stroemungsmechanik
Message-ID: <33BA98A1.446B@LSTM.Ruhr-UNI-Bochum.De>
References: <5pdrhl$irl AT kernighan DOT cs DOT umass DOT edu>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
Lines: 50
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

PAOLO PISELLI M Z wrote:
> 
> I have been programming with DJGPP for a little while and
> want to start building a library out of some of my object files.
> As I am unfamiliar with libraries, I have a few questions which
> I hoped someone could answer:
> 
> 1) What exactly _is_ a library?  Is it a list of object files?
> does it have a header file?
Basically it is some object files dumped into one file and a
header prepended. The idea is that most OSs have large overhead
opening many small files, so it is faster to open one big
file and gather the information in one file. 

> 
> 2) How do you link a library into a program in the following ways:
> on the command line, in a makefile, in RHIDE
If I have libname.a:

 gcc -Lpath/to/my/library -o my.exe mysrc.c -lname

As you put commandlines into makefiles, it is same there.

In Rhide: (this is by heart, so don't beat me...)
Options|Directories|Libraries: Enter path/to/my/library
Project|Libraries: Enter name

> 
> 3) How do you create a library on the command line, in a makefile,
> and in RHIDE?
Command line: Check the info file for the binutils, ar.exe
RHIDE:
Project|Main Targetname:  libname.a



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


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