Is there a best practice guide for distributing native C libraries for Windows?

Does anyone know a best practice guide for deploying regular (non-COM, non-.NET) ANSI C Windows-shared libraries?

Our product uses zlib, and we distribute ready-made binaries on our download page that are different from those listed on the official zlib page. I assume the reason for this is to avoid mixing C versions. The official ones are built against msvcrt using VC ++ 6.0, and VS.NET/2005/2008 will use msvcrt71 / 80/90.

What I want to do is create VS2005 / 8 solutions and projects that will build zlib correctly for us and distribute them instead of what we have now. I would like to do this carefully and distribute the useful package correctly, which I could then send to zlib curators for inclusion in their original distribution. However, finding reliable information was not easy. I have a bunch of Win32 programming books and I have found many articles on the Internet, but none of this seems to require a detailed description of what you really need to distribute.

For example, zlib distributes .exp, .lib, and .def files, where fftw distributes .def files, but not .lib stubs and .exp files. I guess I could just dump everything that looks useful in it (or just reflect what is currently in the official zlib), but I would like to know why it should be there and in which directories it belongs to.

Are there any good examples of well-supported Windows distributions for libraries that originated in the unix world?

Official zlib binary distributions (scroll down)

Our Windows distributions

COMPLETE:

zlib ( ) Windows, . , zlib , DLL, . , , .

+5
3

, C . , DLL . . DLL, (think plugin), () CRT, .

, CRT DLL . , DLL , - , malloc() free(). API DLL .

, Lua Binaries, , , . - . Windows Lua, Windows, ( ) CRT , DLL-, , .

, , Dependency Walker, , CRT, - DLL, , . , . , , Lua, Dependency Walker Makefile , perl script , , DLL , .

, DLL , (, , ), , , DLL ( , , , ). , DLL , .

DLL , , , Lua Binaries. DLL, (.LIB) . DLL, VS, , , , .DEF, . MinGW , Borland C , , , C, , .

, Lua, Perl, TCL Python, , C, , , " " CRT.

+2

, LuaBinaries. , , Lua , , "" , , , Lua, -, , "" Lua , .

Windows , Lua_5_1_4_Win32_{PLAT}{VER}_lib.zip. {PLAT} Cygwin, VC [6-9], MinGW DLL, .

, , lua5_1_4_Win32_vc9_lib.zip, lua5.1.lib ( ), ( VS2008).

lua5_1_4_Win32_dll9_lib.zip lua5.1.lib lua5.1.dll - .lib , , .

- Visual Studio, , DLL, , , DLL , - , LoadLibrary GetProcAddress DLL.

, .def DLL MinGW VS, , - VS .def .libs, VS .lib. .lib .def ( ), - pexports .def, .

, LuaBinaries - , Win32. , .lib- VS, , VS2003.lib .dll -, VS2008, .

+1

If your goal is end users (i.e. you just need your application to run), you only need to distribute the DLL.

-1
source

All Articles