1

I am trying to compile libPNG with MinGW-gcc under windows.

First I compile the sources:

gcc -c -O3 src\*.c

Then for making a static library:

ar rvs lib\libpng.a *.o

I get a .a static library which is 273kB large. Fine

Then I try to make a DLL version:

g++ -shared -o bin\libpng.dll *.o -lz -Wl,--out-implib,lib\libpng.dll.a

I get a DLL which is 366kB (fine) and an import lib which is 272kB large.

Usually, import libraries are very small (such as 5kB), for instance I have compiled OpenEXR in both static and dynamic flavors, the size of the static .a is similar to the size of the DLL (1.5 ratio) and the dynamic .a is very small (few kBs)

Is everything normal, or is something wrong?

galinette
  • 8,896
  • 2
  • 36
  • 87

0 Answers0