PDA

View Full Version : Problem building Firebird sql plugins



vieraci
23rd April 2007, 23:51
Hi All,
This is my first post, getting the hang of both Qt AND Linux, so please be gentle on me :rolleyes:

I'm following the Qt Assistant to build the Plugin on Unix (Linux).
I have Firebird 2.x installed, the directions says:
cd $QTDIR/src/plugins/sqldrivers/ibase

$QTDIR= /usr/lib/qt3 on my installation, so I'm assuming the doc is a bit dated, I cd into

/usr/lib/qt4/plugins/sqldrivers
and where the instructions read:

qmake -o Makefile "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib" ibase.pro

I changed the line to:
qmake -o Makefile "INCLUDEPATH+=/opt/firebird/include" "LIBS+=L/opt/firebird/lib" fb.pro

I get an error message: "Cannot find file: fb.pro"
There is no .pro file anywhere in the FB directories.

I did a google on "ibase.pro" and came up with the Trolltech help page, which says
"You need the InterBase/Firebird development headers and libraries to build this plugin."
I downloaded the source code from ourceforge for Firebird, but there's no .pro file in there either !|:confused:
Anyone know where I can find it ?
Cheers,

jacek
24th April 2007, 00:03
Have you tried running qmake -o Makefile "INCLUDEPATH+=/opt/firebird/include" "LIBS+=-L/opt/firebird/lib" ibase.pro?

vieraci
24th April 2007, 02:31
Yes, the message is "Cannot find file: ibase.pro"

jacek
24th April 2007, 13:24
Do you have Qt4 sources installed?

But first check whether your distribution doesn't ship the IBase/Firebird driver. The package should be called qt4-plugins-ibase or similar.

vieraci
25th April 2007, 13:54
How can I tell if I have Qt4 sources installed ?

There is one dir: /usr/lib/qt4/plugins/sqldrivers but only files in that directory are:
libqsqlpsql.so
libsqlmysql.so
libsqlodbc.so
libsqlite.so

jacek
25th April 2007, 14:14
Which Linux distribution do you use?

vieraci
25th April 2007, 14:22
OpenSUSE 10.2

jacek
25th April 2007, 19:38
OK, so it seems that there is no precompiled driver available for OpenSUSE. You can download Qt sources from here: ftp://ftp.trolltech.com/qt/source

vieraci
26th April 2007, 03:13
OK, I've downloaded the sources,
qt-1xx-opensource-src-4.2.1.tar.gz
(I assume that's the correct download ?)
Before I attempt it, I'd like to confirm certain settings:
The Trolltech site has a "How to build the plugin on Unix/Linux"
quote:
The following assumes Interbase or Firebird is installed in /opt/interbase:

cd $QTDIR/plugins/src/sqldrivers/ibase
qmake -o Makefile "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib" ibase.pro
make
end quote.

My installation of Firebird is in /opt/firebird
The PATH setting shows /usr/lib/qt3/bin:
There's no sqldrivers dir in /usr/lib/qt3/plugins/ but ther is one in:
/usr/lib/qt4/plugins
The QTDIR shows /usr/lib/qt3
Question:
Should I alter my PATH and QTDIR statements ?
Where should I extract the sources to ?

jacek
26th April 2007, 10:26
The QTDIR shows /usr/lib/qt3
Question:
Should I alter my PATH and QTDIR statements ?
You don't have to change them, but make sure you run qmake from Qt4.


Where should I extract the sources to ?
It doesn't matter, but of course you will have to go to that directory instead of $QTDIR/plugins/src/sqldrivers/ibase.

According to the docs, you have to run:
qmake -o Makefile "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib -lfbclient" ibase.pro

dijam
11th September 2008, 10:48
I solve my sql connection in windows but in my linux i have a problem.
In Windows , I had my drivers in one directory and i just copyed what i wanted in my program directory .
I use Fedora 9 , KDE
my Linux didn't have Qt4 , and i installed myself
in /usr/lib/qt4/plugins/sqldrivers directory i just have one available driver :
libqsqlite.so


i'm new in qt , i don't know what i should do .
i wana know i should creat dirvers or find them from some where ...

Thanks
Majid sadeghi

jacek
12th September 2008, 01:28
my Linux didn't have Qt4 , and i installed myself
in /usr/lib/qt4/plugins/sqldrivers directory i just have one available driver
Check if your distribution provides ready-made package with that driver.