Mail Archives: djgpp/1998/06/17/02:55:48
> ----------
> From: FaehnTim AT aol DOT com[SMTP:FaehnTim AT aol DOT com]
> Sent: mercredi 17 juin 1998 8:41
> To: EFT.Eric Devolder
> Subject: How/Where new libraries?
>
> 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)
>
> -or- I use:
>
> gxx -g -o cdtest cdtest.cc libbcd.a
> The error is:
> gcc.exe: libbcd.a: No such file or directory (ENOENT)
> cdtest.cc:1: bcd.h: No such file or directory (ENOENT)
>
> 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.
>
> Thank you,
> Tim Faehnle
>
Two possibilities:
a) if your library is in the same directory than your executable, simply
add -L./ in your command line (to indicate that gcc has to seek for
libraries in this path), and add -lbcd.
b) you can still work with -lbcd alone, if you copy your libbcd.a file
to %DJGPP%\lib directory, or if you modify your DJGPP.ENV file, by
adding the path to your library.
Eric Devolder
- Raw text -