QODBC3 driver not loaded
-
Hi all,
I've been in trouble for 2 weeks trying to install the ODBC3 driver on Raspbian to use it in a Qt Creator Prokect (Qt5 installed).
I need to access from my Raspberry a Database on SQL Server, thus I need ODBC driver.
I installed unixODBC and FreeTDS, and I am able to connect to the database by isql command.
What I am struggling on is the installation of the ODBC driver.
I downloaded the unixODBC, then./configure
qmake install
sudo make installAfter that I went to
cd /usr/lib/i386-linux-gnu/qt5/plugins/sqldrivers
sudo qmake -- ODBC_PREFIX =/usr/local/unixODBCBut I obtain only
Usage: /usr/lib/qt5/bin/qmake [mode] [options] [files]with all the description of usage of qmake.
and if I try to do
make sub-odbc
I get make: *** No rule to make target 'sub-odbc'. Stop.
What I am doing wrong?
Thank you for your support.
-
@Henry89it said in QODBC3 driver not loaded:
What I am doing wrong?
You don't follow the documentation - you should run qmake in the sqldrivers source dir, not in some binary dir. Also you should never ever call qmake with sudo - it's not needed.
-
Hi, are you sure you're installing on your Raspberry and not on a PC?
On my Raspberry, unixODBC gets installed in /usr/lib/arm-linux-gnueabihf not in /usr/lib/i386-linux-gnu
(for example the libodbc.so.2 dll needed by Qt5's libqsqlodbc.so is in the /usr/lib/arm-linux-gnueabihf directory)
Also, to build the libqsqlodbc.so ODBC3 driver you need to download Qt5 source files (that matches the version of Qt5 you have installed). More here