Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved QODBC3 driver not loaded

    General and Desktop
    3
    3
    233
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Henry89it last edited by

      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 install

      After that I went to
      cd /usr/lib/i386-linux-gnu/qt5/plugins/sqldrivers
      sudo qmake -- ODBC_PREFIX =/usr/local/unixODBC

      But 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.

      1 Reply Last reply Reply Quote 0
      • Christian Ehrlicher
        Christian Ehrlicher Lifetime Qt Champion last edited by

        @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.

        Qt has to stay free or it will die.

        1 Reply Last reply Reply Quote 1
        • hskoglund
          hskoglund last edited by

          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

          1 Reply Last reply Reply Quote 1
          • First post
            Last post