Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
c++ - zlib DLL
Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, as a means of familiarizing myself with the DMC tools, I am trying to compile the zlib static library and DLL. I adjusted the makefile for GNU make/gcc for DMC. It is attached. It seems that the static lib is built correctly. The test application example.exe links with it and seems to run fine. <begin> zlib version 1.2.3 = 0x1230, compile flags = 0x55 uncompress(): hello, hello! gzread(): hello, hello! gzgets() after gzseek: hello! inflate(): hello, hello! large_inflate(): OK after inflateSync(): hello, hello! inflate with dictionary: hello, hello! <end> minigzip.exe, however, doesn't work: <begin> echo hello world | minigzip | minigzip -d F:\coding\dmc\libs\zlib\miniF:\coding\gzip.exe: can't gzdmc\libs\zlib\minidopen stdout gzip.exe: <fd:0>: Bad file descriptor <end> I suspect this has something to do with the pipes... The DLL builds without errors and an import lib is generated. The DEF file I used is attached. However, running example_d.exe (also builds) will result in this output: <begin> zlib version 1.2.3 = 0x1230, compile flags = 0x55 <end> ... and then hangs. I can CRTL-C out of it though. As I don't have dumpexe, I attached the output of Borlands tdump of my zlib1.dll. I came across a post on c++.announce where someone made a makefile for zlib. It makes use of dllmain.c, which is not included in current versions of zlib (was it ever?). It seems that DllMain is only optional for building a DLL however (http://msdn2.microsoft.com/en-us/library/ms885202.aspx). Is that correct? Kind regards, Brecht Jan 21 2007
|