|
From: Eli Z. <el...@gn...> - 2014-02-15 14:24:45
|
> Date: Sat, 15 Feb 2014 13:40:18 +0200 > From: Charm0nt <cha...@ma...> > > So libraries link static. Then I added libz.dll.a to search path and recompiled program. Result file size decreased and I get zlib1.dll in export libraries. > > Next I build openssl with shared directive. I got libssl.dll.a file and recompile program again. I get file with size 50 KB and next export libraries: > > DLL Name: kernel32.dll > DLL Name: msvcrt.dll > DLL Name: msvcrt.dll > DLL Name: ws2_32.dll > DLL Name: LIBEAY32.dll > DLL Name: libgcc_s_dw2-1.dll > > And here I don't understand 3 things: > 1. Is zlib links static? Why, if I have libz.dll.a? Does your program call zlib functions directly? If it doesn't (as I'm guessing), then the dependency on zlib1.dll should now be in one of the other DLLs, probably the OpenSSL one. It was previously in your executable because OpenSSL was linked in statically, thus passing the dependency to your executable. > 2. Why advapi32.dll and gdi32.dll I don't see in export libraries list now? Probably for the same reason. > 3. How to link static libgcc_s_dw2-1.dll? Pass the -static-libgcc flag to the compiler. |