Page 1 of 1

Unable to static link libstdc++ for win32

Posted: 13 Dec 2011 17:30
by squaresugar
Hi,

Thanks to jb's guide (http://wiki.videolan.org/Win32CompileMSYSNew), I've been able to build vlc-1.1.11 *nearly* perfect.

The only issue I have so far is the libqt4_plugin.dll does not link staticly with libgcc and libstdc++, since I can see libgcc_s_sjlj-1.dll and
libstdc++-6.dll are loaded in the process explorer. This makes me unable to launch the qt interface when I use the built installer to install to a machine without libgcc and libstdc++ dlls.

Does it have to do with the latest TDM gcc 4.6.1 I am using instead of the one 4.5.2 mentioned in the guide?
I am not seeing the libstdc++.la at /mingw/lib/gcc/mingw32/4.6.1/ either.
Can this be the problem in linking?
I've also tried with LDFLAGS options -static-libgcc -static-libstdc++, which appears to take no effect!
any hint on this?
Thanks a lot!

Re: Unable to static link libstdc++ for win32

Posted: 13 Dec 2011 23:28
by Jean-Baptiste Kempf
Use TDM-gcc sljl, not dw2

Re: Unable to static link libstdc++ for win32

Posted: 14 Dec 2011 04:49
by squaresugar
This is pretty weird.
I am sure using the TDM-gcc sljl, as I used the TDM installer and selected the component for sljl instead of the dw2.

Re: Unable to static link libstdc++ for win32

Posted: 14 Dec 2011 08:31
by squaresugar
Renaming /mingw/lib/gcc/mingw32/4.6.1/libstdc++.dll.a to something else fixes the problem for me! guess that forces linking to the libstdc++.a. I don't know what happens to the compiler settings leading to this problem though.

anyway, after two days frustration, it's finally been solved!

Re: Unable to static link libstdc++ for win32

Posted: 18 Jan 2012 15:31
by SENCO
Dear all,

I'm experiencing the same problem when compiling using TDM 4.6.1 (sljl).
Solved using squaresugar trick.

Thank you.