digitalmars.D - Removing zlib1.dll in favor of zlib1.lib
- Etienne Cimon (51/51) May 07 2014 I wrote a zlib.mak file for statically compiling the new zlib 1.2.8 on
- Jacob Carlborg (4/6) May 07 2014 Isn't zlib already included in Phobos. It contains the sources at least.
- Etienne Cimon (4/8) May 08 2014 Yes, I see version 1.2.5 here:
- Jacob Carlborg (5/6) May 08 2014 Actually, I don't know. I just know the zlib source code is included in
- Kagamin (2/2) May 08 2014 I wrote a D application, using zlib from phobos, it didn't
- Etienne Cimon (2/4) May 08 2014 Thanks!
- Kagamin (2/2) May 09 2014 You can just compile a sample application using zlib from phobos
I wrote a zlib.mak file for statically compiling the new zlib 1.2.8 on
dmc, using make -fzlib.mak
I'm copying it here because it may help remove the default dependency on
zlib1.dll in DMD, not that it's a big deal, but some of us were talking
about a standalone GUI application using dwt or dfl a few threads back
and this would be necessary if it needs basic compression too on
Windows. So here it is:
STATICLIB = zlib1.lib
CC = dmc
CFLAGS = -mn -g -DNO_snprintf=1
LD = $(CC)
LDFLAGS = -L/co -L/ma
LT = lib
LTFLAGS = -c
OBJS = adler32.obj compress.obj crc32.obj deflate.obj infback.obj \
inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj
zutil.obj \
gzclose.obj gzlib.obj gzread.obj gzwrite.obj
all: $(STATICLIB)
.c.obj:
$(CC) $(CFLAGS) -c -o$ $<
$(STATICLIB): $(OBJS)
-del $(STATICLIB)
$(LT) $(LTFLAGS) $ $(OBJS)
clean:
-del $(STATICLIB)
-del $(SHAREDLIB)
-del $(IMPLIB)
-del *.obj
-del *.exe
-del *.map
-del foo.gz
adler32.obj: zutil.h zlib.h zconf.h
compress.obj: zlib.h zconf.h
crc32.obj: zutil.h zlib.h zconf.h crc32.h
deflate.obj: deflate.h zutil.h zlib.h zconf.h
example.obj: zlib.h zconf.h
gzclose.obj: zlib.h zconf.h gzguts.h
gzlib.obj: zlib.h zconf.h gzguts.h
gzread.obj: zlib.h zconf.h gzguts.h
gzwrite.obj: zlib.h zconf.h gzguts.h
inffast.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inflate.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inffixed.h
infback.obj: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
inffixed.h
inftrees.obj: zutil.h zlib.h zconf.h inftrees.h
minigzip.obj: zlib.h zconf.h
trees.obj: deflate.h zutil.h zlib.h zconf.h trees.h
uncompr.obj: zlib.h zconf.h
zutil.obj: zutil.h zlib.h zconf.h
May 07 2014
On 08/05/14 06:54, Etienne Cimon wrote:I wrote a zlib.mak file for statically compiling the new zlib 1.2.8 on dmc, using make -fzlib.makIsn't zlib already included in Phobos. It contains the sources at least. -- /Jacob Carlborg
May 07 2014
On 2014-05-08 02:08, Jacob Carlborg wrote:On 08/05/14 06:54, Etienne Cimon wrote:Yes, I see version 1.2.5 here: https://github.com/D-Programming-Language/phobos/tree/fixmaster/etc/c/zlib I saw the dll in the dmd2 bin folder so I assumed it was necessary. Is it?I wrote a zlib.mak file for statically compiling the new zlib 1.2.8 on dmc, using make -fzlib.makIsn't zlib already included in Phobos. It contains the sources at least.
May 08 2014
On 2014-05-08 15:50, Etienne Cimon wrote:I saw the dll in the dmd2 bin folder so I assumed it was necessary. Is it?Actually, I don't know. I just know the zlib source code is included in Phobos, in etc/c/zlib. -- /Jacob Carlborg
May 08 2014
I wrote a D application, using zlib from phobos, it didn't require dll, IIRC.
May 08 2014
On 2014-05-08 15:50, Kagamin wrote:I wrote a D application, using zlib from phobos, it didn't require dll, IIRC.Thanks!
May 08 2014
You can just compile a sample application using zlib from phobos and see if it works without dll.
May 09 2014









Jacob Carlborg <doob me.com> 