Mail Archives: djgpp/1998/08/04/04:02:04
Goh Yong Kwang <s6606555 AT mercury DOT np DOT ac DOT sg> wrote in article
<Pine DOT SOL DOT 3 DOT 91 DOT 980803095118 DOT 23337B-100000 AT mercury>...
>
> 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
- Raw text -