Results 1 to 19 of 19

Thread: libgcc_s_dw2-1.dll?

  1. #1
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default libgcc_s_dw2-1.dll?

    apparently this new dll is added in the latest version of Qt.
    what is it? what does it do?
    and what about changes in static linking procedure etc.

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    apparently ? So you don't know for sure ?

    Since it starts "libgcc", I'd say it's part of a newer version of GCC that is used. Other than that, there will be no other changes, no changes to static linking, etc.

  3. #3
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    I mean from static fully static.
    for example mingwm10.dll that isn't part of Qt itself is not linked statically when linking Qt statically (but we can make it static too of course).
    probably the option that makes mingwm10.dll linked statically would make libgcc_s_dw2-1.dll so too.

  4. #4
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    Quote Originally Posted by fatjuicymole View Post
    apparently ? So you don't know for sure ?
    ...
    I am unsure about everything
    it causes no harm often, and at least is better than false assurance.

  5. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    mingwm10.dll isn't part of GCC as such as you can easily build GCC without it (You can, for example, use Cygwin instead).

    A quick google turns up this:

    "Dynamic linking with libgcc_s_dw2-1.dll is necessary to throw exceptions between different modules, such as between two DLLs or a DLL and an EXE. Consequently, it is the default for all languages other than C. To disable this dynamic linking, use -static-libgcc. To enable this dynamic linking in C, use -shared-libgcc."

  6. #6
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    how to pass that option to Qt's build system?

  7. #7
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    I don't use GCC, but MSVC, so I've no idea. I would expect CPPFLAGS or similar however.

    Is it really a problem for you however? Have you actually tried to deploy an app without that library to see if it still functions?
    Last edited by squidge; 16th December 2009 at 09:05.

  8. #8
    Join Date
    May 2009
    Posts
    147
    Thanks
    11
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    Have you actually tried to deploy an app without that library to see if it still functions?
    yes, it's needed.
    but I didn't attempt to make a fully static executable yet (but I did with prior versions of Qt without this new dll).
    libgcc_s_dw2-1.dll is not a problem, and is small; but I am very curious and want to know everything before encountering.

  9. #9
    Join Date
    Aug 2009
    Posts
    50
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    I just installed Qt4.6 and I'm finding that although my application compiles and runs perfectly well from within Qt Creator, if I try to run it from outside (i.e. by clicking on the executable) then I get the "libgcc_s_dw2-1.dll was not found" error.

    I downloaded the missing file (which wasn't trivial - you have to fetch down gcc-core-4.4.0-mingw32-dll.tar.gz from SourceForge, and extract the needed file from it) and put it in the same directory as my executable, and the error went away.

    It would be great if someone at Qt could add the file to the official Qt4.6 release - it would certainly have saved a lot of time today.

    Stephen.

  10. #10
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    If your application compiles and runs perfectly well from within Qt Creator, then you already have the libgcc_s_dw2-1.dll, otherwise it wouldnt run

    What you'll probably find is that your system path setup is incorrect, so the OS can't find the file when you quit Qt Creator.

  11. #11
    Join Date
    Aug 2009
    Posts
    50
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    You're right, I found it in my C:\Qt\2009.05\qt\bin directory, while looking for it manually; an earlier Vista file search had failed to locate it.

  12. #12
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    Quote Originally Posted by FS Lover View Post
    how to pass that option to Qt's build system?
    You can pass that option with QMAKE_LFLAGS.

    With the command line:
    qmake QMAKE_LFLAGS+=-static-libgcc -config release

    Or adding QMAKE_LFLAGS+=-static-libgcc in your .pro file.

  13. #13
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    Quote Originally Posted by christophe View Post
    You can pass that option with QMAKE_LFLAGS.

    With the command line:
    qmake QMAKE_LFLAGS+=-static-libgcc -config release

    Or adding QMAKE_LFLAGS+=-static-libgcc in your .pro file.
    I am seeing this now too all of a sudden after installing the latest Windows Qt SDK 2010.01. Qt configured to dynamic linking, i.e. no change since installation.

    I tried the suggested QMAKE_LFLAGS but that was a nogo.

    Does this mean I have to add this dll to my installer? If so, then shouldn't this be mentioned in the Application Dependencies on this page:
    http://doc.qt.nokia.com/4.6/deployment-windows.html
    Last edited by schnitzel; 26th January 2010 at 02:06.

  14. #14
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    found this:
    http://marc.info/?l=mingw-users&w=2&..._dw2-1.dll&q=b
    look under 'General Notes' in the first post of that thread.

    Deployed apps work after adding this dll, but is it ok for me to distribute it??????

  15. #15
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    this dependency doesn't seem to exist in Qt 4.5.3, so I'm going back to that.

  16. #16
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    It's part of GCC, not Qt, and yes, it's OK for you to distribute it under the terms of the LGPL. You can also use the linker option "-static-libgcc" to remove the need for the library.

    Or, you can use an older version of MinGW. There's no need to use an older version of Qt.

  17. #17
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    Quote Originally Posted by fatjuicymole View Post
    It's part of GCC, not Qt, and yes, it's OK for you to distribute it under the terms of the LGPL. You can also use the linker option "-static-libgcc" to remove the need for the library.

    Or, you can use an older version of MinGW. There's no need to use an older version of Qt.
    My app uses qextserialport, so I rebuilt that with the linker flag. Also I rebuilt my app with the linker flag. Unfortunately, it still complains about the libgcc_s_dw2-1.dll.
    When I run depends, the missing dll shows up inside the tree for QtGUI.dll and QtCore4.dll. Does this mean I have to reconfigure Qt with the new linker flag?

  18. #18
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: libgcc_s_dw2-1.dll?

    Quote Originally Posted by fatjuicymole View Post
    It's part of GCC, not Qt, and yes, it's OK for you to distribute it under the terms of the LGPL.
    according to the discussion in this link it might not be ok:
    http://old.nabble.com/distributing-L...d25342619.html

    Quote Originally Posted by fatjuicymole View Post
    You can also use the linker option "-static-libgcc" to remove the need for the library.
    Still haven't made any progress on this, I tried several times no luck.

  19. #19
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libgcc_s_dw2-1.dll?

    Yes, you would need to rebuild Qt too for this to work, as that also uses the library.

  20. The following user says thank you to squidge for this useful post:

    schnitzel (30th January 2010)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.