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
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
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....
Re: win:cpy execs & dlls to clean machine - get "can't open application database" err
Quote:
Originally Posted by
rickbsgu
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.
Re: win:cpy execs & dlls to clean machine - get "can't open application database" err
Quote:
Originally Posted by
wysota
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.
Re: win:cpy execs & dlls to clean machine - get "can't open application database" err
Quote:
Originally Posted by
rickbsgu
I think the docs specified to put the .dll parallel to the .exe file
No, they didn't.
Quote:
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.
Quote:
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.
Re: win:cpy execs & dlls to clean machine - get "can't open application database" err
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.
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
Re: win:cpy execs & dlls to clean machine - get "can't open application database" err
Quote:
Originally Posted by
rickbsgu
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'.
Quote:
"... 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.
Quote:
I might be able to help. Does vBulletin have a better/newer search plugin available?
If it had, I would have already installed it.
Re: win:cpy execs & dlls to clean machine - get "can't open application database" err
Quote:
Originally Posted by
rickbsgu
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'.
Quote:
"... 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.
Quote:
I might be able to help. Does vBulletin have a better/newer search plugin available?
If it had, I would have already installed it.
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
Re: win:cpy execs & dlls to clean machine - get "can't open application database" err
Quote:
Originally Posted by
rickbsgu
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/