1

When using zlib with mingw32, should I be linking to the zlib1.dll file, or to some zlib.so file? I would think the latter, but cannot find any resources explaining how to get and/or use such a file.

Baruch
  • 20,590
  • 28
  • 126
  • 201
  • Really - [can't find it?](http://tinyurl.com/5wprf7q). Pick a random project page and read: http://sourceforge.net/projects/mingw/files/MinGW/zlib/ – sehe Jul 12 '11 at 21:44
  • @sehe I went through nearly all the top 20 Google results. They all refer to using the `.dll` – Baruch Jul 12 '11 at 21:46
  • soo, why do you think you should use the so? Are you not telling us vital information (are you on linux?) – sehe Jul 12 '11 at 22:05
  • @sehe No, I am on windows. I just thought that the "native" thing for mingw was `.so` libraries, and `.dll`'s must have some kind of wrapper which incurs an overhead. – Baruch Jul 12 '11 at 22:53
  • The good news is: you were making things more complicated than necessary – sehe Jul 12 '11 at 22:54
  • @sehe "The good news is: you were making things more complicated than necessary" - How so? – Baruch Jul 14 '11 at 06:26

1 Answers1

0

Also on linux the usual recipe is

mingw-g++ ...... -lole32

which links to a DLL, not an .so; The executable produced is also a Windows executable, remember.

See e.g. my recent post here: Discovering registered COM components which compiles the same binary on both linux and windows

Community
  • 1
  • 1
sehe
  • 374,641
  • 47
  • 450
  • 633