1

I'm trying to compile zbar-0.10 to be statically linked to the MinGW dependencies, so it doesn't require libgcc_s_dw2-1.dll, libwinpthread-1.dll, and libstdc++-6.dll.

Following the accepted answer from MinGW .exe requires a few gcc dll's regardless of the code?, I tried adding -static -static-libgcc -static-libstdc++ to my ./configure script parameters:

./configure -static-libgcc -static-libstdc++ -static -lpthread --without-qt --without-gtk --without-python --without-imagemagick

But I got this error:

configure: error: unrecognized option: -static-libgcc

What are the correct parameters to pass to the configure script so the MinGW dependencies are statically linked to ZBar?

sashoalm
  • 75,001
  • 122
  • 434
  • 781
  • Maybe your MinGW version does not support it? Are you using libtool? if yes, [this man](http://www.mingw.org/wiki/HOWTO_Sneak_GCC_Switches_Past_Libtool) should help. – LPs Apr 27 '16 at 10:09

1 Answers1

0

The option -static is enough for what you want achieve when you use MinGW toolchain.

scrutari
  • 1,378
  • 2
  • 17
  • 33