Results 1 to 6 of 6

Thread: Build without any dependencies

  1. #1
    Join Date
    Dec 2009
    Posts
    12
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Build without any dependencies

    Hello

    I'd like to build a small executable without any dependencies, including qt. Is it possible with QtCreator + MinGW?

    P.S. I don't mean linking qt statically, I just don't need qt libraries in this case. But maybe I'll need to link MinGW dependencies statically.

    Thanks
    Last edited by Dato0011; 22nd December 2009 at 11:41.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Build without any dependencies

    Yes, just select an empty Qt project in creator.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Dec 2009
    Posts
    12
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build without any dependencies

    Thanks flyer

    Qt dependency is fixed, but now how can I build it statically? I mean, when i run the built exe, it gives an error libgcc_s_dw2-1.dll is missing.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Build without any dependencies

    Is your creator configured to work with MinGW?
    It sounds like the MinGW configuration is broken, but I can't tell, I am working with msvc as a compiler for my creator, maybe some one else who uses MinGW can help you more.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Dec 2009
    Posts
    12
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build without any dependencies

    Thanks flyer

    BTW Dev C++ compiled exe is not dependent on libgcc_s_dw2-1.dll (with mingw). but when i compile from qtcreator with mingw it does.
    I prefer to use QtCreator ide, but don't want that libgcc_s_dw2-1.dll dependency. Anyone has any idea?

  6. #6
    Join Date
    Dec 2009
    Posts
    19
    Thanks
    2
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Build without any dependencies

    Quote Originally Posted by Dato0011 View Post
    I prefer to use QtCreator ide, but don't want that libgcc_s_dw2-1.dll dependency. Anyone has any idea?
    That library is responsible for new exception model ("DWARF" as long as I remember) used in gcc 4.4, which is not yet included in standard mingw, but included in mingw bundled with qt (since 4.6). If you try to compile your app using standard mingw and try to link it to qt 4.6 you'll get unresolved symbols for aforementioned reason.
    So if you really want to use Qt 4.6 on Windows without that dependencies you will need to fully compile Qt itself using standard mingw (or maybe MSVC) I suppose.

    P.S. I may be wrong

  7. The following user says thank you to nateriver for this useful post:

    Dato0011 (23rd December 2009)

Similar Threads

  1. Moving from QT 4.5 shared build to QT 4.5.2 static build
    By extrakun in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2009, 10:49
  2. Replies: 1
    Last Post: 19th October 2009, 19:44
  3. Customized build (problems, bugs, patches, licencing issues...)
    By Domagoj Saric in forum Installation and Deployment
    Replies: 2
    Last Post: 6th October 2009, 11:48
  4. Build error on mac Platform::WaitMouseMoved
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 12th July 2007, 14:18
  5. QMAKE: Specifying Build Dependencies
    By JohnSuykerbuyk in forum Qt Programming
    Replies: 1
    Last Post: 5th May 2006, 10: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.