Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Mysql driver for qt error "Cannot find file: mysql.pro"
Forum Update on Monday, May 27th 2025

Mysql driver for qt error "Cannot find file: mysql.pro"

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
mysqlqt 5.5mysql.prodriver
3 Posts 3 Posters 3.4k 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.
  • R Offline
    R Offline
    Randomator
    wrote on 11 Mar 2016, 15:44 last edited by
    #1

    I have been spending the whole day trying to figure out how to compile the mysql driver for qt so that i can import a database into table view, but nothing that I have found has helped me out. I am currently using qt 5.5 and Mysql server 5.7. My issue is that I get a certain error when running the following command in the qt command prompt:

    set mysql=C:\PROGRA~2\MySQL\MYSQLS~1.7

    cd C:\Qt\5.5\mingw492_32\plugins\sqldrivers

    qmake "INCLUDEPATH+=%mysql%\include" "LIBS+=%mysql%\lib\libmysql.lib" -o Makefile mysql.pro

    mingw32-make

    And I get the error "cannot find file: mysql.pro"

    I don't understand. Am I missing the file in the directory? Or have I not installed qt properly?

    A 1 Reply Last reply 14 Mar 2016, 17:08
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 11 Mar 2016, 16:32 last edited by
      #2

      Hi and welcome to devnet,

      You're doing that in an already build Qt, that's wrong. You need to first get the sources. You can do that from the Maintenance Tool.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Randomator
        11 Mar 2016, 15:44

        I have been spending the whole day trying to figure out how to compile the mysql driver for qt so that i can import a database into table view, but nothing that I have found has helped me out. I am currently using qt 5.5 and Mysql server 5.7. My issue is that I get a certain error when running the following command in the qt command prompt:

        set mysql=C:\PROGRA~2\MySQL\MYSQLS~1.7

        cd C:\Qt\5.5\mingw492_32\plugins\sqldrivers

        qmake "INCLUDEPATH+=%mysql%\include" "LIBS+=%mysql%\lib\libmysql.lib" -o Makefile mysql.pro

        mingw32-make

        And I get the error "cannot find file: mysql.pro"

        I don't understand. Am I missing the file in the directory? Or have I not installed qt properly?

        A Offline
        A Offline
        azravian
        wrote on 14 Mar 2016, 17:08 last edited by
        #3

        @Randomator Sir,
        download the Qt Sources, e.g current the sources available are qt-everywhere-opensource-src-5.5.1, After extracting
        cd C:\qt-everywhere-opensource-src-5.5.1\qtbase\src\plugins\sqldrivers\mysql
        then make sure you call qmake from Qt5.5, for this purpose you can type the complete path of the qmake.
        then use make and make install.
        I hope it will help you.

        1 Reply Last reply
        0

        1/3

        11 Mar 2016, 15:44

        • Login

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