ishan3243
ishan3243

Reputation: 1928

installing QODBC driver for linux

I am trying to install QODBC drivers on ubuntu 13.10 for Qt 5.0.2. I have followed the official documentation (see http://qt-project.org/doc/qt-5/sql-driver.html#qodbc) but am stuck at one of the steps. When I try to do

qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc"

it just shows me the help manual for qmake and does nothing. So I tried to make an empty Makefile and then passed it as an argument

qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc" Makefile

when I try to "make" the generated Makefile, it shows the following errors:

Makefile:183: warning: overriding commands for target `Makefile'
Makefile:130: warning: ignoring old commands for target `Makefile'
make: Circular Makefile <- Makefile dependency dropped.
make: Circular Makefile <- Makefile dependency dropped.
make: Nothing to be done for `first'.

Upvotes: 0

Views: 3132

Answers (1)

albertTaberner
albertTaberner

Reputation: 2149

I have just managed to make the odbc driver installation. The main problem here seems to be that you are not including the "pro" target file.

Here all the steps are:

  1. Go to odbc pluggin path. In my case: cd ~/Qt/5.3/Src/qtbase/src/plugins/sqldrivers/odbc
  2. Run qmake including the target LIB paths and also the pro file:

    ~/Qt/5.3/gcc_64/bin/qmake -makefile "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lodbc" odbc.pro

  3. make and then sudo make install

I hope it will be usefull. Regards,

Upvotes: 1

Related Questions