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. How to build Mysql driver with QT static build
Forum Updated to NodeBB v4.3 + New Features

How to build Mysql driver with QT static build

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 2.4k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    AmrCoder
    wrote on 4 Jan 2018, 12:08 last edited by
    #1

    I tried to make a qt static version with MySQL build option so I used this to configure

    -plugin-sql-mysql
    

    it gives me an error and the MySQL in the summary file it marked by no so it's not working yet so I used this

    -sql-mysql
    

    for both, i got this error

    ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
    

    so I tried this one

    -qt-sql-mysql
    

    i got this error

    ERROR: Invalid value given for boolean command line option 'sql-mysql'.
    

    so what command should i use to enable mysql to be built with my static version
    Thanks in advance

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Allerknappe
      wrote on 4 Jan 2018, 12:14 last edited by
      #2

      i have the same problem, the only solution that i found was that i use qt 5.7.1 instead a higher version and then it was working. maybe it works with higher version but i tried a few weeks and then i give up.

      1 Reply Last reply
      1
      • A Offline
        A Offline
        AmrCoder
        wrote on 4 Jan 2018, 12:16 last edited by
        #3

        hope that anyone tried this with a higher version to share this iam using QT 5.10 and I did not try the build static version before this

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AmrCoder
          wrote on 4 Jan 2018, 20:30 last edited by AmrCoder 1 Apr 2018, 20:30
          #4

          when I was checking my question, by Coincidence I found the pinned post of How to create the plugin of MYSQL for Qt I check it and I follow some of his steps
          i downloaded the MySQL community server and put it on C drive and rename the folder
          that's all then in my configure command I add this to the end of my command

          -sql-myself -I "C:\MySQL\include" -L "C:\MySQL\lib"
          

          then I found in the summary folder that myself is marked by yes so I started built it then I test a simple MySQL connection with my static build it worked but I should include the .dll folder if not the app crashes I don't know if it's the right way to do this as I add .dll because the goal of the static build is to not use the DLL files it's only standalone app

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 4 Jan 2018, 21:36 last edited by
            #5

            Then you have to also use static libraries for all the dependencies you want to use.

            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

            1/5

            4 Jan 2018, 12:08

            • Login

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