Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QODBC3 driver not loaded
QtWS25 Last Chance

QODBC3 driver not loaded

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 649 Views
  • 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 Offline
    H Offline
    Henry89it
    wrote on last edited by
    #1

    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
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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 Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #3

        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
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved