Dll/dylib correct way to copy/install/etc.. ?



  • I have a Qt project that includes an executable project and a dylib/dll project and I am wondering what is the 'correct' way to make this library accessible by the executable during debugging? On the OSX side I am looking for anyway to do is as I have not figured that out yet, on the windows side I am doing a copy with the QMAKE_PRE_LINK variable.

    Any help would be greatly appreciated.

    Thanks.
    -=ben



  • On OSX I found this to work:

    mylib.path = Contents/MacOS
    mylib.files = ../mylib/mylib-build-desktop/mylib.1.dylib
    QMAKE_BUNDLE_DATA += mylib

    I'll have to test it but seems this might be the way to do it on windows as well?

    Thanks.

    -=ben



  • On a similar note, where on OSX do I find the Qt dylibs to include for distribution?

    Thanks again.

    -=ben



  • [quote author="mirswith" date="1300994583"]On a similar note, where on OSX do I find the Qt dylibs to include for distribution?

    Thanks again.

    -=ben
    [/quote]

    That depends on the Qt type you use (from the SDK, prebuilt library only, self compiled library).



  • I am using Qt Creator, one project is TEMPLATE=lib, CONFIG+=dll and the other is TEMPLATE=app, after digging around I found macdeployqt which is working for me. The only problem I am having now is that when debugging its trying to load my dll from Content/MacOS and for distribution it is looking in Content/Frameworks; why is this different? It would sure be nice if I could use the same location for both so I don't have to make changes just to package my app.

    Thanks.

    -=ben



  • Content/Frameworks is the default path on OS X application bundles. This is the place where an end user expects things.

    Please search the forum, these things were asked a couple of times in the last weeks. "Deployment" is a good keyword to start with.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.