From: "Alberto Chessa" Newsgroups: comp.os.msdos.djgpp Subject: Re: How to create a library? Date: 3 Aug 1998 14:20:55 GMT Organization: TIN Lines: 30 Message-ID: <01bdbeea$589c39a0$92c809c0@chessa> References: NNTP-Posting-Host: a-mi35-4.tin.it To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Goh Yong Kwang wrote in article ... > > I want to create a library but is not quite sure how to do it. > > I think that the first step would be to compile all the c/c++ file into > object file (.o). Then from there, use the ar utility with the -r switch > to add all the .o files to the library. Then copy the library archive > (.a) to djgpp/lib directory. (This is the easiest step. Otherwise I'll > have to fiddle with the djgpp.env file to tell djgpp where to look for my > library). > > Is the procedure correct? Please correct me if I'm wrong. > It's OK but: 1. Do not add file to the djgpp directories! 2. Do not change djgpp.env! (thanks to Eli Zaretskii) To add Your libraries to your environment do: 1. Create a private directory C:\mylibs and put all your libraries here 2. Set (AUTOEXEC.bat) the environment variable LIBRARY_PATH to point to your directory: set LIBRARY_PATH=C:\mylibs involved, so it seems. Suggestions? Thanx Charles -- Charles Krug, Jr. Application Engineer Pentek Corp 1 Park Way Upper Saddle River, NJ 07458