March 24, 2011

mirswith mirswith
Lab Rat
125 posts

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

5 replies

March 24, 2011

mirswith mirswith
Lab Rat
125 posts

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

March 24, 2011

mirswith mirswith
Lab Rat
125 posts

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

Thanks again.

-=ben

March 25, 2011

Volker Volker
Robot Herder
5428 posts

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

Thanks again.

-=ben

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

March 25, 2011

mirswith mirswith
Lab Rat
125 posts

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

March 26, 2011

Volker Volker
Robot Herder
5428 posts

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.

 
  ‹‹ Stop all threads      What happened to "Qt:TextWordBreak"? ››

You must log in to post a reply. Not a member yet? Register here!