www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/07/02:53:51

From: "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to create a library?
Date: Wed, 6 Oct 1999 20:38:57 -0500
Organization: Rose-Hulman Institute of Technology
Lines: 46
Message-ID: <7tgtnb$dne$1@solomon.cs.rose-hulman.edu>
References: <37fbec82 DOT 15713264 AT news DOT linuxfr DOT org>
NNTP-Posting-Host: yerricde.laptop.rose-hulman.edu
X-Trace: solomon.cs.rose-hulman.edu 939260459 14062 137.112.205.146 (7 Oct 1999 01:40:59 GMT)
X-Complaints-To: news AT cs DOT rose-hulman DOT edu
NNTP-Posting-Date: 7 Oct 1999 01:40:59 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

dodger <dodger AT softhome DOT net> wrote in message
news:37fbec82 DOT 15713264 AT news DOT linuxfr DOT org...
> I've been using DJGPP to help me learn platform independent C++
> (or as close as I can get it anyway).

Properly written C++ that compiles under DJGPP will be
portable to any flavor of *n?x.

> I've recently created a simple parse class (C++) that I want to
> distribute as a library (mainly so that I can learn how to create
> libraries and distribute them).  After talking to a few friends, I've
> determined that what I want to do is compile my code to a .lib file

Under GNU tools such as DJGPP, a library is not .lib but .a

> and then distribute it along with the .h header file.  But since none
> of them know DJGPP, they can't tell me exactly how to do that.
>
> I've been poring over the command-line documentation (what I can find,
> can find, anyway), but I can't seem to find what I'm looking for.

DJGPP's "librarian" is called ar. This program that archives
.o (modules) into .a (libraries).

> Can somebody tell me what I need to do
> or at least point me in the right direction
> where I can find some information on this?

Search the GNU docs for "ar"

> Learning C++ is time consuming enough, but trying to learn how to use
> compilers often seems like a daunting task.  (The bulk of my
> programming experience is with all-in-one development enviroments.)
>
> - Shawn

You could try looking at what the "other" Shawn did when he
wrote the makefile to build liballeg.a (the Allegro library).
http://www.talula.demon.co.uk/allegro/


Damian Yerrick
http://come.to/yerrick


- Raw text -


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