From: "Alberto Chessa" Newsgroups: comp.os.msdos.djgpp Subject: Re: How/Where new libraries? Date: 17 Jun 1998 07:07:10 GMT Organization: Telecom Italia Net Message-ID: <01bd99be$c88f1c60$92c809c0@chessa> References: <98e35d01 DOT 35874ab3 AT aol DOT com> NNTP-Posting-Host: a-mi23-62.tin.it Lines: 34 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk FaehnTim AT aol DOT com wrote in article <98e35d01 DOT 35874ab3 AT aol DOT com>... > In which directory do I put a new library? > For example: > I have libbcd.a and I put it into the c:\djgpp\lib directory and compile the > code using (with #include "bcd.h" as line 1): > > gxx -g -o cdtest cdtest.cc -lbcd > The error is: > cdtest.cc:1: bcd.h: No such file or directory (ENOENT) > It seems gxx cannot locate the include file, not the library! Where's bcd.h ? It should be in the include search path or current directory > Is there something else I need to do to make this work? Do I need to put > libbcd.a in a different directory? Do I need a different command line? I'm > not sure what to do. I do not like to add foreign files to djgpp installation directory. Anyway, You can add your new lbrary to C:\DJGPP\lib and new include file also to C:\DJGPP\include. I strongly suggest You to create a new directory (as instance "C:\MYLIBS") with subdirectory "lib" and "include" where put Your new libraries. Then, You can add the directories to GPP search path with the following command line: gxx -I -L -l .... (note: uppuer case i for include path) or edit DJGPP.env and add them there (You do not have to add new directory to command line each time you invoke gcc). For details look at info file (info gcc "Invoking GCC")