Results 1 to 18 of 18

Thread: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    50
    Thanks
    22
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    How can I remove the dependencies for mingwm10.dll and ligcc_s_dw2-1.dll?Should I do static linking?Is it possible to do static linking with Qt Creator?


    How can I do static linking?(step by step please)

  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: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    Try adding the -static-libgcc linker option.

  3. #3
    Join Date
    Oct 2009
    Posts
    50
    Thanks
    22
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    How can I do this?I compile with Qt Creator and don't know how I can compile,link without using Qt Creator.

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

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    You can still use Qt Creator, just put the option in your .pro file like so:

    Qt Code:
    1. win32 {
    2. QMAKE_LFLAGS += -static-libgcc
    3. }
    To copy to clipboard, switch view to plain text mode 

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

    Awareness (11th April 2010)

  6. #5
    Join Date
    Oct 2009
    Posts
    50
    Thanks
    22
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    Thank you very much

  7. #6
    Join Date
    Mar 2010
    Posts
    56
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    Can we do that with the LGPL license?

  8. The following user says thank you to metRo_ for this useful post:

    Lawand (3rd December 2010)

  9. #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: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    That would depend on the licenses of MinGW and libGCC, as they are not Qt related.

  10. #8
    Join Date
    Oct 2009
    Posts
    50
    Thanks
    22
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    I couldn't make it work.

    My project's .pro file is:

    qmake Code:
    1. QT -= core gui
    2.  
    3. TARGET = struct1
    4.  
    5.  
    6. Win32 {
    7. QMAKE_LFLAGS_RELEASE += -static-libgcc
    8. }
    9. CONFIG += console
    10. CONFIG -= app_bundle
    11.  
    12.  
    13. TEMPLATE = app
    14.  
    15.  
    16. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 

    but it still requires mingwm10.dll.
    Last edited by wysota; 13th April 2010 at 14:21. Reason: reformatted to look better

  11. #9
    Join Date
    Mar 2008
    Posts
    1
    Thanked 1 Time in 1 Post

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    You need mingwm10.dll because of the thread module.

    I didn't find how to remove the thread module from the pro file but if you manually remove every occurrence of "-mthreads" in makefiles, it won't complain anymore about mingwm10.dll .

    The problem is that you can not use QThread object in this case.

  12. The following user says thank you to winz for this useful post:

    Awareness (18th April 2010)

  13. #10
    Join Date
    Oct 2009
    Posts
    50
    Thanks
    22
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    Thanks for your answer.Is it not possible to make this mingwm10.dll file staticaly linked?

  14. #11
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    Compile statical qt, first edit %qtdir%\mkspecs\win32-g++\qmake.conf and change
    Qt Code:
    1. QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
    2. QMAKE_LFLAGS = -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
    To copy to clipboard, switch view to plain text mode 
    then recompile using
    Qt Code:
    1. cd %qtdir%
    2. configure -static -release -no-exceptions -[other parameters like -mmx -sse -sse2 -3dnow etc...]
    3. make sub-src
    To copy to clipboard, switch view to plain text mode 
    important here is no-exceptions that tells to link mingwm10.dll. This command compile qt in release mode, add -debug if you want that to. Also properly set Path on windows env. That way everything works fine, assuming configure is success.
    Your project is then LGPL, that means if some one who buy/download your app ask you for sorce code you need to provide it to them. I don't know if mingw allso gave you some restriction, from license point of view.
    Last edited by Talei; 18th April 2010 at 23:52.

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

    Default Re: Removing dependencies for mingwm10.dll and libgcc_s_dw2-1.dll,static linking?

    There doesn't seem to be a static version of MinGW. You can get around the problem with a bit of messing about, but by far the easist way is to change compilers. You can download the free edition of Microsoft's Visual C++ for example.

Similar Threads

  1. static & dynamic linking
    By mickey in forum General Programming
    Replies: 6
    Last Post: 11th June 2010, 09:57
  2. Static linking with Qt
    By prykHetQuo in forum Qt Programming
    Replies: 3
    Last Post: 3rd June 2009, 21:56
  3. Static linking
    By didcea in forum Qt Programming
    Replies: 0
    Last Post: 11th October 2008, 19:40
  4. gentoo qt4 static linking
    By powermax in forum Newbie
    Replies: 1
    Last Post: 27th April 2008, 22:11
  5. Build static on windows without deps on mingwm10.dll
    By ucomesdag in forum Qt Programming
    Replies: 2
    Last Post: 9th July 2007, 06:46

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.