On 1/23/07, Birt, Jeffrey <[EMAIL PROTECTED]> wrote:
Hello all,
I have been attempting to figure out how to build the sqlite2 plugin for QT4.
I need to use V2 as I am working with files written by another program. Here
is a synopsis of where I am at:
I am a relitive newbie to QT et al (but not programming in general). I managed
to downlaod/install/(build the debug files) for QT 4.2.2 open source. I found
Qdevelop (IDE) installed it got the two to play nice a did a few 'Hello World'
programs. (all on WinXP)
I then sat down and tried to write a simple program to access a SQLite V2
database (becasue that is what another software package writes to and I need to
work with those files). I read a bunch of the QT SQL library docs, wite a
simple program and QT tells me that the driver (qsqlite2) for SQLite V2 is not
available. So then I look up how to build the driver here:
http://doc.trolltech.com/4.2/sql-driver.html, and basically says the following
(instruction for V3 same as V2):
On Windows:
cd %QTDIR%\src\plugins\sqldrivers\sqlite
qmake -o Makefile "INCLUDEPATH+=C:\SQLITE\INCLUDE"
"LIBS+=C:\SQLITE\LIB\SQLITE3.LIB" sqlite.pro
make
Looking at the readme in C:\Qt\4.2.2\src\plugins\sqldrivers\sqlite2 revealed
this:
"You will need the SQLite development headers and libraries installed
before compiling this plugin."
So, I take it that I need the SQLite V2 sources. OK, I figured out how to get
sqlite 2.8 downloaded from CVS. Now, that I have these sources how do I get
them in the form that QT wants in order to build the plugin? In other words,
the image of the files from CVS has no lib files or development headers (I
think I have that right). I have done a lot of searching but have not come up
with anything. Can someone at least point me in the right direction. The
sources I got from CVS do not have any type of library file(s) (which I'm
guesing I need) Any help would be most appreciated.
Hi, what you'll need to do is to build sqlite2 from sources with MinGW
(Qt4 default compiler for Windows). Once you have this built, probably
you will get an exe file and hopefully a shared library. (look at the
sqlite install docs for instructions on how to build sqlite library)
I've never done this job specifically, but I've done some similar tasks.
If you can't get sqlite shared library (.dll) built from sources you
may get this library from SQLite site (I hope, I've done this with
SQLite3).
Once you have sqlite.dll you will have to generate .LIB file with
MinGW tools, I can't remember specifically the sintax of gcc for this
now, but take a look at gcc's command line help, but, basically you
will need to generate a .def file from the .dll file and then with
these files (.def and .dll) you will be able to generate .LIB file to
link Qt4 plugin with it.
Just a tip... please, say Qt, not QT. QT is owned by Mac
Hope this help.
Cheers.
--
Leonardo Mateo.
There's no place like ~
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------