PDA

View Full Version : Building plugins for dummies



Jeff_Birt
22nd January 2007, 03:56
The title says it all, I'm looking for "Building plugins for dummies" type of help. 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? 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.

Thanks

__________________
Jeff

e8johan
22nd January 2007, 08:29
You need the source to get access to the headers, the libs are probably distributed in a binary package.

This might help: http://wiki.qtcentre.org/index.php?title=Building_the_QMYSQL_plugin_on_Wind ows_using_MinGW . It is for MySQL but describes the process.

Jeff_Birt
23rd January 2007, 02:29
Thankn you very much for your help! I am looking at the link you gave. The sources I downloaded do not contain any /lib or /bin directories. I read somewhere about creating a .lib file from a .def file. I'm afraid my problem is an insufuccuient depth of knowledge of how the compilers work with these diffren file types. The link you mentioned refernces some mingw tools (utilities) that are needed. I think that may be the place to look next (the mingw docs). I'll report back any findings.

kandalf
24th January 2007, 03:21
I've post you some steps on how to do this in sqlite-users mailing list.
Maybe I can help you more in depth with the syntax of gcc if you need.

Cheers.