Build: ok, run: not ok

Marius Storm-Olsen marius at trolltech.com
Mon Oct 22 09:08:58 CEST 2007


George Staikos said the following on 22.10.2007 08:54:
> On 22-Oct-07, at 2:48 AM, Marius Storm-Olsen wrote:
>> George Staikos said the following on 22.10.2007 05:53:
>>> I seem to have the exact same problem.  I have an application  
>>> linked to a dll, linked to Qt.  The Qt dlls are not getting
>>> deployed by visual studio (2005) but the app dll and the app
>>> executable are. I assume this is the reason I'm seeing this error.
>>> I don't think I'm doing anything particularly fancy with the .pro.
>>> Any ideas how to debug this?
>> Oh, wait a minute. Am I correct in assuming that you have an  
>> application, which links to a custom DLL which used Qt? Meaning  
>> that your application is not using Qt directly, but through this  
>> custom DLL?
>>
>> From what I've heard, when you generate a project with qmake for Qt/ 
>> CE, then there should be added a Post Link step which deploys the  
>> Qt DLLs for that application. However, if your setup is like I  
>> suspect, then your application is not using Qt directly, so this  
>> step would not be there. Thus, you'd need to deploy the Qt DLLs  
>> manually.
> 
>    That's exactly it.  Hm that's unfortunate.  Is there no trick I  
> could use to hardcode $(QTDIR)/lib/{dlls} that I use into the .pro to  
> have them deployed?  Perhaps as data files?

Ah, this explains things. Ok, so here's what you can do. There's a way 
to specify random files for deployment with your application. It works 
like this:

     # Deploy my custom files
     deployQt.sources = <File paths>
     deployQt.path = <CE path on device>
     DEPLOYMENT += deployQt

     # Deploy MSVC run-times for CE
     deployRT.sources = <VisualStudio>/vc/ce/dll/*/ms*.dll
     deployRT.path = <CE path on device>
     DEPLOYMENT += deployRT

So, if you put something like this in your .pro file:

     # Deploy my custom files
     deployQt.sources = <QTDIR>/libs/Qt*.dll
     deployQt.path = \Windows
     DEPLOYMENT += deployQt

     # Deploy MSVC run-times for CE
     deployRT.sources = <VisualStudio>/vc/ce/dll/armv4i/ms*.dll
     deployRT.path = \Windows
     DEPLOYMENT += deployRT

It should deploy what you need.
Feedback on how it works out for you much appreciated! :-)

-- 
.marius

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.trolltech.com/pipermail/qtce-preview-feedback/attachments/20071022/2fe61f50/attachment.bin 


More information about the Qtce-preview-feedback mailing list