Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Compiling example createzip.d (SVN version)

Moderators: kris

Posted: 02/21/08 11:13:25

Hi all,

I'm a newbie for D and Windows Vista user.

I'm trying to compile tango from his SVN version and, when I try a "dsss build" on "example\". At the compilation of "createzip", the compiler give me the error :

conduits\createzip.d => conduits\createzip
+ C:\DMD\dmd\bin\rebuild.exe -Idsss_imports\ -I. -S.\ -IC:\DMD\dmd\include\d -SC:\DMD\dmd\lib\  -IC:\DMD\dmd\include\d -
SC:\DMD\dmd\lib  -oqdsss_objs\D -L-lz conduits\createzip.d -ofconduits\createzip
C:\DMD\dmd\bin\..\..\dm\bin\link.exe dsss_objs\D\_createzip,conduits\createzip,,user32+kernel32/noi+DD-tango-io.lib+DD-t
ango-text.lib+DD-tango-io.lib+DD-tango-text.lib+DD-tango-time.lib+DD-tango-io.lib+DD-tango-stdc.lib+DD-tango-io.lib+DD-t
ango-stdc.lib+DD-tango-io.lib+DD-tango-stdc.lib+DD-tango-io.lib+DD-tango-text.lib+DD-tango-io.lib+DD-tango-time.lib+DD-t
ango-io.lib+DD-tango-sys.lib+DD-tango-io.lib+DD-tango-core.lib+.\\+C:\DMD\dmd\lib\\+C:\DMD\dmd\lib\-lz+tango-user-dmd.li
b+tango-user-dmd.lib;
OPTLINK (R) for Win32  Release 8.00.1
Copyright (C) Digital Mars 1989-2004  All rights reserved.
C:\DMD\dmd\lib\-lz.lib
 Warning 2: File Not Found C:\DMD\dmd\lib\-lz.lib
C:\DMD\dmd\lib\\DD-tango-io.lib(ZlibStream)
 Error 42: Symbol Undefined _inflateEnd
C:\DMD\dmd\lib\\DD-tango-io.lib(ZlibStream)
 Error 42: Symbol Undefined _inflate
C:\DMD\dmd\lib\\DD-tango-io.lib(ZlibStream)
 Error 42: Symbol Undefined _deflateEnd
C:\DMD\dmd\lib\\DD-tango-io.lib(ZlibStream)
 Error 42: Symbol Undefined _deflate
C:\DMD\dmd\lib\\DD-tango-io.lib(zlib)
 Error 42: Symbol Undefined _inflateInit2_
C:\DMD\dmd\lib\\DD-tango-io.lib(zlib)
 Error 42: Symbol Undefined _deflateInit2_
--- errorlevel 6
Command C:\DMD\dmd\bin\rebuild.exe returned with code -1, aborting.
Error: Command failed, aborting.

I don't understand this "-lz" : file not found .

Thanks in advance for your help. TSalm

Author Message

Posted: 02/21/08 18:31:38

Seems like dsss is trying to link support for zlib compression, via the lz.lib library. I would recommend using the pre-built binary bundles instead since they avoid having to deal with dsss, librarians, and such things. You can get the bundles from the Tango download page.

Posted: 02/21/08 21:20:08

There is nothing wrong with using dsss here, but the dsss.conf is indeed wrong for the zip examples as the library is specified in an OS specific manner. I'll see if that can be fixed. You will in any case have to make sure zlib (zlib.lib I believe is the correct file name) is available, and that dsss has the library path, either through the command line or the configuration.

Posted: 02/21/08 22:11:44 -- Modified: 02/21/08 22:15:00 by
tsalm

I see. -L-lz is a flag for gcc, isn't it ?

Personnaly, I've installed the zlib.lib from http://drk.is-a-geek.net/~drk/tango/tango.io.compress-libs.zip ( is there a more official one ? )

Here is a path on this dsss.conf that compile all ok with the dm linker :

Index: dsss.conf
===================================================================
--- dsss.conf	(revision 3236)
+++ dsss.conf	(working copy)
@@ -2,7 +2,7 @@
 buildflags += -unittest
 [conduits/composite.d]
 [conduits/createzip.d]
-buildflags += -L-lz
+buildflags += -L"zlib;libbz2"
 [conduits/filebubbler.d]
 [conduits/filecat.d]
 [conduits/filecopy.d]
@@ -38,7 +38,10 @@
 [text/properties.d]
 [text/token.d]
 [text/xmldom.d]
+buildflags += -Jtext
 [text/xmlpull.d]
+buildflags += -Jtext
 [text/xmlsax.d]
+buildflags += -Jtext
 [vfs/vfszip.d]
-buildflags += -L-lz
+buildflags += -L"zlib;libbz2"

The other directive "-Jtext" resolv the error message :

text\xmldom.d(23): Error: need -Jpath switch to import text file hamlet.xml
Command C:\DMD\dmd\bin\rebuild.exe returned with code 1, aborting.
Error: Command failed, aborting.

my versions are : dmd v1.025 and the dm link 8.00.1 on Windows (vista)

Posted: 02/21/08 22:50:03

Thanks!

I have fixed dsss.conf in trunk.

Btw, Tango is working properly on Vista for you?

Posted: 02/22/08 14:25:11

Thanks, now examples compile without problem. But, it seems to me that the flag -L-lz or -Lzlib depend of the linker rather than the OS, I'm not sure...

larsivi wrote:

Btw, Tango is working properly on Vista for you?

I will verify it by testing if all examples are ok on Vista...

tsalm