Results 1 to 20 of 24

Thread: How to link an existing .exe to a DLL?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2010
    Location
    Singapore
    Posts
    156
    Thanks
    47
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: How to link an existing .exe to a DLL?

    Hi,
    Could you explain further?
    My app.exe is compiled using MinGW and proj.dll is compiled using VS.
    and I wish to link my app.exe with the proj.dll.(however, i wish to compile and link both using MinGW)
    So am I doing it correctly now,or I need a proj.a to link with my app.exe?(by the way can VS output *.a file?)


    bit confused *-)
    Last edited by babygal; 22nd April 2010 at 08:20.

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to link an existing .exe to a DLL?

    If you compile your app.exe with MinGW then all libraries you link to has to be .a
    So you have to convert your proj.lib to proj.a (or as I said it can be libproj.a - not sure about it).
    Search the net or forum to find how to do it. It was mentioned some days ago in some post here on QtCentre, AFAIR the tools are 'dlltool' and reimp or something like this.

  3. The following user says thank you to faldzip for this useful post:

    babygal (27th April 2010)

  4. #3
    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 link an existing .exe to a DLL?

    It is difficult to link MVSC DLL to GCC executable by using static stub.

    The easiest way would be to use QLibrary in this instance, then you don't need .a or .lib files, just the DLL.

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

    babygal (27th April 2010)

  6. #4
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to link an existing .exe to a DLL?

    So another solution might be to use VisualStudio Express Edition and compile Qt with it :] (I don't remember if there is WindowsSDK or rather PlatformSDK needed for this)

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

    babygal (27th April 2010)

  8. #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: How to link an existing .exe to a DLL?

    That'll work, just remember that the Express editions don't support the Qt addin.

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

    babygal (27th April 2010)

  10. #6
    Join Date
    Apr 2010
    Location
    Singapore
    Posts
    156
    Thanks
    47
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to link an existing .exe to a DLL?

    Quote Originally Posted by fatjuicymole View Post
    That'll work, just remember that the Express editions don't support the Qt addin.
    Hi, What is Qt addin and what is it's purpose?

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

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

    babygal (27th April 2010)

  13. #8
    Join Date
    Apr 2010
    Location
    Singapore
    Posts
    156
    Thanks
    47
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to link an existing .exe to a DLL?

    Hi,, Which is the easiest method and how to do it?

  14. #9
    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 link an existing .exe to a DLL?

    Depends on the DLL complexity and your skill level. Read this entire thread, choose the one that you understand the most and choose that.

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

    babygal (27th April 2010)

  16. #10
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to link an existing .exe to a DLL?

    Quote Originally Posted by fatjuicymole View Post
    That'll work, just remember that the Express editions don't support the Qt addin.
    But you can have MSVC and use it in Qt Creator - that is the way I choose :] and you don't need any Qt Add-in
    Nice developing with Qt connected with nice and completly Windows way to produce Windows application. I don't like MinGW as it looks like forcing applications compiled with Unix compiler to run on Windows - 1st thought: rather not comfortable and not efficient.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  17. The following user says thank you to faldzip for this useful post:

    babygal (27th April 2010)

  18. #11
    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 link an existing .exe to a DLL?

    Which is why I use Visual Studio 2008. QtCreator is nice, but VS2008 with the plugins you are used to is much better. My full time job is software engineer, I use VS at work and work pays for the home VS license too, so it makes sense to me.

    But of course the situation is different for each person. I'm not sure on the deployment licensing of VS express edition, but using the VS EE under QtCreator is a good choice for non-commercial work.

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

    babygal (27th April 2010)

  20. #12
    Join Date
    Apr 2010
    Location
    Singapore
    Posts
    156
    Thanks
    47
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to link an existing .exe to a DLL?

    Quote Originally Posted by faldżip View Post
    But you can have MSVC and use it in Qt Creator - that is the way I choose :] and you don't need any Qt Add-in
    Nice developing with Qt connected with nice and completly Windows way to produce Windows application. I don't like MinGW as it looks like forcing applications compiled with Unix compiler to run on Windows - 1st thought: rather not comfortable and not efficient.
    1. How to "have MVSC and use it in Qt Creator"?If I do it this way, compiling is done using VC or GCC?

  21. #13
    Join Date
    Apr 2010
    Location
    Singapore
    Posts
    156
    Thanks
    47
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to link an existing .exe to a DLL?

    Quote Originally Posted by faldżip View Post
    So another solution might be to use VisualStudio Express Edition and compile Qt with it :] (I don't remember if there is WindowsSDK or rather PlatformSDK needed for this)
    Hi , I don't know how to do this?Could you explain.

Similar Threads

  1. Completer with existing ui form
    By vladozar in forum Qt Programming
    Replies: 1
    Last Post: 12th December 2009, 15:35
  2. How to write qt4 gui up to the existing console
    By binaural in forum Qt Programming
    Replies: 4
    Last Post: 16th June 2009, 13:44
  3. Add existing project
    By danesh in forum Qt Programming
    Replies: 12
    Last Post: 23rd April 2009, 19:47
  4. replace existing process with the new one
    By memus in forum Qt Programming
    Replies: 1
    Last Post: 14th August 2008, 16:40
  5. Installing Qt 4 with existing Qt3
    By Honestmath in forum Installation and Deployment
    Replies: 2
    Last Post: 27th March 2006, 21:00

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
  •  
Qt is a trademark of The Qt Company.