From: Weiqi Gao Newsgroups: comp.os.msdos.djgpp Subject: Re: How to create a library? Date: Wed, 06 Oct 1999 20:51:00 -0500 Organization: CRL Network Services Lines: 37 Message-ID: <37FBFC84.A5B0766@a.crl.com> References: <37fbec82 DOT 15713264 AT news DOT linuxfr DOT org> NNTP-Posting-Host: a116018.stl1.as.crl.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i586) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com dodger wrote: > > I've been using DJGPP to help me learn platform independent C++ (or as > close as I can get it anyway). > > 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 > 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. Your friends are right, except that, for DJGPP, the libraries you create will be a .a file. Because DJGPP uses a object file format from any other DOS based compiler, the .a file can be used only by other DJGPP programs. > I've been poring over the command-line documentation (what I can find, > anyway), but I can't seem to find what I'm looking for. 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? Look at "gcc -c", "ar", and "ranlib", all hidden in the info files somewhere. > 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.) Luckily, what you learn with DJGPP is the GNU C compiler, which has been ported to many many platforms. What you learn will be useful for a long time to come. Unlike Visual Studio, which has a habit of rearranging the menus from version to version. -- Weiqi Gao weiqigao AT a DOT crl DOT com