Results 1 to 11 of 11

Thread: win:cpy execs & dlls to clean machine - get "can't open application database" error

  1. #1
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default win:cpy execs & dlls to clean machine - get "can't open application database" error

    Qt: 4.6.3 - binary distribution
    VC2005 - release build

    Trying to copy the execs and relevent dlls to a clean machine for test distributions.

    I'm getting the above error on launch - don't get to the first line in main.cpp

    Seems like it's looking for a .pdb file? This is a release build, so there shouldn't be a reference to a .pdb file.

    The relevent dlls are:
    • QtCore4.dll
    • QtGui.dll
    • QtSql4.dll


    I am using the SQLITE driver, which I believe is built in, yes? So I shouldn't need an extra .dll for that (I don't think...).

    Runs fine on the dev machine - not on the clean machine. So it's finding the 'program database' somewhere (on the dev machine)...

    I've tried pulling in all of the .dlls and all of the .pdb files from the dev machine to the local directory containing the .exe - no go.


    Grief... Maybe I'll try pulling over the VC2005 runtimes, but I'm not getting that kind of error...

    Any thoughts appreciated.

    rickb

  2. #2
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Well, duh. It's my error - trying to create the sqlite db.

    The problem is it's not loading the driver. I've pulled the whole plugin tree from the distribution parallel to the executable in the file structure, and it still doesn't see them.

    I've put also pulled all of the sql dlls parallel to the executable - still doesn't see them...

    Where the heck is it looking for the plugins?

    I'll try setting the application library path and see if that does anything...

    Meanwhile, any thoughts appreciated...
    rickb

  3. #3
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Adding an 'application library path' to the plugins directory parallel to the executable did the trick.

    Will have to make sure the Mac is bundled the same way.

    Every time I get into this sort of mess, I'm reminded how clean static builds are....

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Quote Originally Posted by rickbsgu View Post
    Adding an 'application library path' to the plugins directory parallel to the executable did the trick.

    Will have to make sure the Mac is bundled the same way.

    Every time I get into this sort of mess, I'm reminded how clean static builds are....
    And all that was required was to place the qsqlite.dll into sqldrivers subdirectory of your application. What's clearly documented in the docs and throughout this site, by the way.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Quote Originally Posted by wysota View Post
    And all that was required was to place the qsqlite.dll into sqldrivers subdirectory of your application. What's clearly documented in the docs and throughout this site, by the way.
    I think the docs specified to put the .dll parallel to the .exe file - which did not work. Putting the 'sqldrivers' or any other plugins subdirectory parallel to the executable is not specified, as I read it, but I can read it again.

    If the site had a better search mechanism, I might be able to find things more easily. Searching for 'plugins location' gives me everything with 'plugins' and everything with 'location' in no particular order, which is not very helpful. I get better results with Google search.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Quote Originally Posted by rickbsgu View Post
    I think the docs specified to put the .dll parallel to the .exe file
    No, they didn't.

    Putting the 'sqldrivers' or any other plugins subdirectory parallel to the executable is not specified, as I read it, but I can read it again.
    To quote the docs:
    Quote Originally Posted by Deploying Plugins docs
    For example if the application is in C:\Program Files\MyApp and has a style plugin, Qt will look in C:\Program Files\MyApp\styles.
    If the site had a better search mechanism, I might be able to find things more easily.
    Yes, blame us
    - Missing Images,
    - Qt docs have a nice search function,
    - there is nothing wrong in using Google, I spent literally hours to make it index Qt Centre properly so I strongly encourage anyone to make use of my effort,
    - we will gladly accept your help in improving the search engine.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Originally Posted by Deploying Plugins docs
    For example if the application is in C:\Program Files\MyApp and has a style plugin, Qt will look in C:\Program Files\MyApp\styles.
    So, what is styles? A directory or a plugin?

    "... would look for C:\Program Files\MyApp\styles\<plugin.dll>" might convey things a bit better, no?

    Kudos that you've spent hours and effort getting Google to index you well. The site search still sucks.


    I might be able to help. Does vBulletin have a better/newer search plugin available?
    How do I get access to the site?

    Cheers,
    rickb

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Quote Originally Posted by rickbsgu View Post
    So, what is styles? A directory or a plugin?
    Well...
    1) bearing the fact there is a directory called "styles" in your $QTDIR/plugins directory it's obviously a directory,
    2) bearing the fact it is said Qt will look in styles for the plugin it is obviously not a plugin and obviously something that is a container,
    3) it would be really silly if Qt would look for a plugin called 'style' in a file called 'styles'.

    "... would look for C:\Program Files\MyApp\styles\<plugin.dll>" might convey things a bit better, no?
    No, because then you'd say it would be looking for a file "<plugin.dll>". For me the docs are clear enough. It's enough to look into your Qt installation directory to see the pattern immediately.

    I might be able to help. Does vBulletin have a better/newer search plugin available?
    If it had, I would have already installed it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Quote Originally Posted by rickbsgu View Post
    So, what is styles? A directory or a plugin?
    Well...
    1) bearing the fact there is a directory called "styles" in your $QTDIR/plugins directory it's obviously a directory,
    2) bearing the fact it is said Qt will look in styles for the plugin it is obviously not a plugin and obviously something that is a container,
    3) it would be really silly if Qt would look for a plugin called 'style' in a file called 'styles'.

    "... would look for C:\Program Files\MyApp\styles\<plugin.dll>" might convey things a bit better, no?
    No, because then you'd say it would be looking for a file "<plugin.dll>". For me the docs are clear enough. It's enough to look into your Qt installation directory to see the pattern immediately.

    I might be able to help. Does vBulletin have a better/newer search plugin available?
    If it had, I would have already installed it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Jan 2006
    Location
    Earth (Terra)
    Posts
    87
    Thanks
    4
    Thanked 6 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Well, we'll just have to disagree. I don't think the doc is written very clearly, at all.

    I guess that's a 'no' on offer of help.

    rickb

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: win:cpy execs & dlls to clean machine - get "can't open application database" err

    Quote Originally Posted by rickbsgu View Post
    I don't think the doc is written very clearly, at all.
    Why don't you improve it then? You can contribute to Qt (and its docs), you know...

    http://qt.gitorious.org/
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 9
    Last Post: 20th May 2010, 09:55
  2. Replies: 0
    Last Post: 4th November 2009, 10:21
  3. Replies: 3
    Last Post: 11th January 2009, 05:22
  4. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  5. QFile Problem~ "Unknow error" in "open(QIODevice::ReadWrite)"
    By fengtian.we in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 15:58

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.