Unable to static link libstdc++ for win32

This forum is about all development around libVLC.
squaresugar
New Cone
New Cone
Posts: 6
Joined: 10 Nov 2011 16:50

Unable to static link libstdc++ for win32

Postby squaresugar » 13 Dec 2011 17:30

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!

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Unable to static link libstdc++ for win32

Postby Jean-Baptiste Kempf » 13 Dec 2011 23:28

Use TDM-gcc sljl, not dw2
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

squaresugar
New Cone
New Cone
Posts: 6
Joined: 10 Nov 2011 16:50

Re: Unable to static link libstdc++ for win32

Postby squaresugar » 14 Dec 2011 04:49

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.

squaresugar
New Cone
New Cone
Posts: 6
Joined: 10 Nov 2011 16:50

Re: Unable to static link libstdc++ for win32

Postby squaresugar » 14 Dec 2011 08:31

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!

SENCO
New Cone
New Cone
Posts: 6
Joined: 22 Apr 2008 14:04

Re: Unable to static link libstdc++ for win32

Postby SENCO » 18 Jan 2012 15:31

Dear all,

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

Thank you.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests