Results 1 to 3 of 3

Thread: qt.conf (again) on windows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default qt.conf (again) on windows

    Hi, guys

    I will deploy some applications in a USB stick, and I am planning to keep the Qt DLLs in a separate, common folder for all apps.

    So, I'm planning to have a "qt.conf" with each executable, to make sure they will find the libraries.

    I have read in the docs that, on a "qt.conf" file, the paths are relative to the directory containing the application executable, and this is perfect for a USB stick.

    So, this file would be something like this:

    Qt Code:
    1. [Paths]
    2. Prefix=..\Qt
    3. Binaries=bin
    4. Plugins=plugins
    To copy to clipboard, switch view to plain text mode 

    The directory structure for, say, QtCore4.dll and qgif4.dll (one of the plugins) is as bellow, from the point of view of any of the apps:

    ..\Qt\bin\QtCore4.dll
    ..\Qt\plugins\imageformats\qgif4.dll

    But when I start any of them from a "cmd" window prompt, in the executable direcory,the message "could not find QtCore4.dll" always pops up.

    If I manually put the full path of the "bin" directory in the PATH variable (in this case, "K:\Qt\bin", and the app in "K:\pp\pp.exe"), it works.

    What am i doing wrong?

    Thanks
    Francisco

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

    Default Re: qt.conf (again) on windows

    Nothing, the application requires the core libraries (such as QtCore4.dll) before it can parse the qt.conf file as the code to parse that file is in that library

    What you need to do is what you have already tried - either adjust the path variable for the life of the application with a program loader or batch file, or put the DLLs in with the executable.

    Another way would be to create "stubs", as in you have each application in it's own dir, the DLLs in another dir along with the application executable. One you run the stub, it will launch the main executable from the "bin" folder.

  3. #3
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Cool Re: qt.conf (again) on windows - SOLVED

    Quote Originally Posted by fatjuicymole View Post
    Nothing, the application requires the core libraries (such as QtCore4.dll) before it can parse the qt.conf file as the code to parse that file is in that library

    What you need to do is what you have already tried - either adjust the path variable for the life of the application with a program loader or batch file, or put the DLLs in with the executable.

    Another way would be to create "stubs", as in you have each application in it's own dir, the DLLs in another dir along with the application executable. One you run the stub, it will launch the main executable from the "bin" folder.
    Thanks a lot, I should have be less desperate and think a little bit more, now that you pointed, it's obvious that QtCore4.dll must be found so that all other Qt start up events may take place.

    Thanks again
    Francisco

Similar Threads

  1. qmake.conf in MAC OS
    By anupamgee in forum Newbie
    Replies: 4
    Last Post: 27th October 2011, 23:36
  2. qt.conf
    By wirasto in forum Qt Programming
    Replies: 5
    Last Post: 25th December 2009, 14:45
  3. Qt.conf??? Maybe not...
    By Nefastious in forum Installation and Deployment
    Replies: 1
    Last Post: 7th November 2009, 22:32
  4. Failure to read QMAKESPEC conf file
    By hosseinyounesi in forum Qt Programming
    Replies: 1
    Last Post: 24th July 2009, 04:12
  5. Trolltech.conf Linking
    By ToddAtWSU in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2007, 18:23

Tags for this Thread

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.