Results 1 to 15 of 15

Thread: How to add the Dll to the application??

  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default How to add the Dll to the application??

    I have completed a project in Qt. After everything, if i run the exe alone, it says it needs that dll and 4 more dlls, Anyway the final product will be the single exe file. So how it could be achieved by including all the dlls and make working the single exe for the required application.

  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: How to add the Dll to the application??

    google for: static linking.
    ==========================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
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add the Dll to the application??

    I have searched lots and lots. Till now i didnt get any good answers. Please help me.

  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: How to add the Dll to the application??

    Answer to what?
    Do you know what static linking is and how it is being done?
    ==========================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
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add the Dll to the application??

    No, i dont know how to do that also.. any sample code for that please..

  6. #6
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to add the Dll to the application??

    hi gokul, Im bala. I too frm cbe. nice to meet u.
    So how it could be achieved by including all the dlls and make working the single exe for the required application.
    as high_flyer said, try static linking.
    http://doc.qt.nokia.com/4.7/deployment.html

    hope it helps,
    Bala

  7. #7
    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: How to add the Dll to the application??

    No, i dont know how to do that also.. any sample code for that please..
    well, then:
    1. google for: static linking.
    2. read about static linking.

    Then you will know!
    ==========================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.

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

    Default Re: How to add the Dll to the application??

    Before you statically link everything into one executable you might want to check the licensing agreements for each DLL. For example, unless you have commercial license for Qt, you must allow people to relink your application (eg, provide source or object code). Some libraries may not work correctly when statically linked.

  9. #9
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add the Dll to the application??

    Hi Bala. thats great please to meet you....

  10. #10
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add the Dll to the application??

    How to link the dll statically via mingwm10,libgcc_s_dw2-1,QtCore4,QtGui4,QtNetwork4???? If I copy the exe file and run in the other machine which doesnt have QT installed.It says the following dlls needed. How to link those files statically.Pls help me

  11. #11
    Join Date
    Apr 2011
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to add the Dll to the application??

    There is no need for static linking. When DLLS does not work, there could be a few reasons:

    1. DLL is not found in the path: (Add the path to QT and your DLLs (if any) in system settings (or start it from commandline and do a SET PATH=%PATH%;X:\PATH\TO\MY\DLLS;X:\PATH\TO\QT\BIN;
    2. DLL has not the correct references: To use functions/variables in DLL, you need EXPORT/IMPORT settings. Please search for Q_DECL_EXPORT and Q_DECL_IMPORT in QT documentation...

    Regards,
    Peter

  12. #12
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add the Dll to the application??

    http://docs.mitk.org/0.14/qxtglobal_8h.html

    Here it contains the importing and exporting of the dlls but how it can be done.. Could anyone help me in this please.. How to include mingwm10,libgcc_s_dw2-1,QtCore4,QtGui4,QtNetwork4?

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

    Default Re: How to add the Dll to the application??

    Just copy them to the same directory as your executable.

    If you statically link you have to agree to different licenses than if you don't, therefore it's far easier to just dynamically link.

  14. #14
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to add the Dll to the application??

    I want to build only the exe file not the supporting files with it. How to link the dlls statically.. or adding the dlls. Just one big exe file which contains all the dlls in it

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

    Default Re: How to add the Dll to the application??

    You'll need to recompile Qt - see 'Deploying Qt Applications' -> http://doc.qt.nokia.com/latest/deployment.html

Similar Threads

  1. Replies: 8
    Last Post: 5th November 2012, 08:43
  2. Replies: 2
    Last Post: 21st November 2010, 18:03
  3. Replies: 3
    Last Post: 20th October 2010, 22:36
  4. Replies: 3
    Last Post: 6th January 2010, 16:55
  5. Replies: 12
    Last Post: 29th February 2008, 13:35

Tags for this Thread

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.