Results 1 to 7 of 7

Thread: Specify the DLL directory

  1. #1
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Specify the DLL directory

    Hello,

    I would like ma application to be installed on a computer that hasn't Qt installed.

    So, I could compile Qt in static mode, but errors occurs.
    Other possibility is to join the Qt/MinGW DLLs with my application, and that's what I've done.

    The matter is that I've to put the DLLs with my .exe, and I would prefer store them in other directory. But how could I say to my app that the DLLs aren't with the .exe file, but in other directory ?

    Thanks for your help

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Specify the DLL directory

    Quote Originally Posted by Nyphel View Post
    The matter is that I've to put the DLLs with my .exe, and I would prefer store them in other directory. But how could I say to my app that the DLLs aren't with the .exe file, but in other directory ?
    Any directory listed in PATH environment variable does the trick on Windows.
    J-P Nurmi

  3. #3
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Specify the DLL directory

    Yes, but the application will be installed on many computers and configurations, so I'm not sure that the path would be recorded .

    Moreover, I would like it to work correctly under Unix

    So, there isn't other possibility ? I must copy the DLLs in the .exe directory ?

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Specify the DLL directory

    When you distribute your app you can copy the dll's in the app dir or in the system libraries dir ( system32 on win, /usr/lib on linux ). Mac is an exception - you have the choice of frameworks there, which will be included in the bundle.

    Regards

  5. #5
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Specify the DLL directory

    So, if my app path is like :
    c:/myapp/myapp.exe

    Can I copy the DLLs in
    c:/myapp/dll/


  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Specify the DLL directory

    No .

    Unless you load the library dynamically, you can't.
    It has to be in the app dir. Look at other apps, for example...

    Regards

  7. #7
    Join Date
    Feb 2007
    Posts
    158
    Thanks
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Specify the DLL directory

    Ok, thanks

Similar Threads

  1. QDirModel - show directory ".."?
    By jamd in forum Qt Programming
    Replies: 3
    Last Post: 23rd April 2009, 19:51
  2. error in compiling qtopia.....
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 11th January 2007, 09:10
  3. errors while installing Qt4.2 in Linux
    By nimmyj in forum Installation and Deployment
    Replies: 11
    Last Post: 13th December 2006, 11:58
  4. create file in another directory
    By raphaelf in forum Qt Programming
    Replies: 3
    Last Post: 16th February 2006, 10:04
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

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.