From: Luke Dunstan <coder_infidel@ho...> - 2003-02-03 09:17:51
>From: "Martell, Jeremiah" <jmarte01@...>
>Subject: [Mingw-users] compiling libraries
>Date: Mon, 3 Feb 2003 02:38:01 -0500
> please forgive me if im asking a question already answered, but i
>seem to search the mailing list archives at sourceforge.net.
If you tried a search and the page appeared half blank, you didn't wait long
>i cant figure
>out how to create a library file (~.a ?) so i can link my code more easily
>to libraries such as zlib ( http://www.gzip.org/zlib/ )and mss (
>http://hem.passagen.se/blizzar/mss/ ) and perhaps others i would like to
>make. as of now i link with zlib by simply including each ~.o file for the
>numerous ~.c files that zlib is. it would be much simpler for me to create
>zlib library and link to it instead. how can i go about doing this with
> - jeremiah
The zlib instructions should give you some help. If you are using MSYS, go
to the zlib source directory and type "./configure && make" and it will
build the libz.a library plus example programs. This will probably work from
the Cygwin shell too in case you are using that. If you are using the
Windows command prompt you can probably make a few changes to the Makefile
instead of using configure, then run make, but for building third-party
software like zlib it will be a lot easier with MSYS. Note that you probably
shouldn't run "make install" unless you know exactly what it does.
In answer to your general question, use the "ar" command, and for example
see the zlib Makefile.
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.