[Qt-interest] Building Qt on Windows XP with the -system-sqlite option
Robert Hairgrove
evorgriahr at hispeed.ch
Thu Apr 28 22:43:55 CEST 2011
On Thu, 2011-04-28 at 16:32 -0400, Pascal Patry wrote:
> On Thursday, April 28, 2011 16:16:29 Robert Hairgrove wrote:
> > How do I "install" the sqlite3.dll in my system so that Qt configure.exe
> > can find it?
> >
> > I downloaded the DLL from www.sqlite.org, copied it into my C:\WINDOWS
> > \system32 folder, put the sqlite3.h into its own folder and added that
> > [...]
>
> If I can recommend you something... don't try to build sqlite with a
> dependency to the DLL. There is a distribution of sqlite you can get on
> the site that will give you only 2 headers and 1 C file. Include
> directly those into the .pro of the qsqlite plugin and compile it.
>
> By doing this, you eliminate the need for that extra DLL. You get better
> optimization for the compiled code (look at the sqlite.org website for
> more information about this). And you get proper debugging symbols
> without issues if needed in debug mode.
I got it to work ... looks like I had forgotten to copy the .exp file to
the LIB folder. Now Qt is merrily configuring away...
The problem with building the plugin the way you describe is that I
cannot access the native SQLite driver from the QSqlDriver object and
call native SQLite functions on it because none of the native SQLite
functions are exported from the plugin.
I could link statically with SQLite, but then I have to use the
(relatively old) version which is distributed with Qt. This way, I can
link my application with the same SQLite used by the plugin. I can
include the SQLite DLL with my application, too.
More information about the Qt-interest-old
mailing list