tags:

views:

31

answers:

2

The shared library is causing much trouble for me, and disk space is far less expensive than the trouble itself.

How can I convert all shared libs(.dll) to static libs(.lib) and make my programe use them instead of using shared libs?

Note some .dlls are not directly refered to by my programe,e.g. my programe requires libpng,and libpng requires zlib.dll.

Is there a solution that wraps up all these cases?

A: 

You cannot convert a shared library (dll) to a static library (lib). The dll contains headers, exports, and such things that make it completely impossible to do.

If you have access to the source, you can usually recompile it as a static library. Otherwise, you will have to get your hands on the static library yourself.

George Edison
A: 

There is no practical way to convert DLLs to static libraries. You will either need to find the actual static libraries, or you will need to build them from source.

Ignacio Vazquez-Abrams