Mail Archives: djgpp/1998/06/19/01:45:49
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<new-include-dir> -L<new-lib-dir> -l<your-new-lib> ....
(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")
- Raw text -