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. QT and MYSQL on Windows 7 64-Bit
QtWS25 Last Chance

QT and MYSQL on Windows 7 64-Bit

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 3 Posters 8.8k 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.
  • G Offline
    G Offline
    GroundZero
    wrote on 19 Jan 2012, 22:05 last edited by
    #1

    Dear readers.

    I have been trying to install MYSQL for over 2 weeks now without any success.
    Hopefully anyone can walk me through it. I will try to give you as much information as possible.

    1. I am using Microsoft Windows 7 Professional 64-Bit version.
    2. I downloaden Qt SDK from http://qt.nokia.com/products/ (the left one containing Qt 4.7.4, Creator and Qt Quick)
    3. I downloaden MYSQL from dev.mysql.com/downloads/mysql/ and chose the Windows (x86, 32-bit), MSI Installer *

    I tried like (seriously) way over 20 tutorials but none worked out. The one I think was best was the one located at
    http://ieatbinary.com/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/

    Anyways, when I open Qt4.7.3 for Desktop (MinGW) it does NOT recognise the qmake command. I have to use the
    Qt4.7.4 for Desktop (MinGW) program. This one does recognise the qmake command.

    When I follow the tutorial and enter the command:
    qmake "INCLUDEPATH+=%mysql%\include" "LIBS+=%mysql%\lib\libmysql.lib" -o Makefile mysql.pro

    I reveive this error four times:
    WARNING: (internal):1: Unescaped backslasher are deprecated.

    Anyways, I read on the internet that more people had this error, but when proceeding it didnt matter to them so I
    tried to proceed to the next command which is:
    mingw32-make

    This gives me a load of text and at the end the following error:
    !http://img694.imageshack.us/img694/5885/18774773.png(screenshot of DOS prompt with errors)!

    It does not make the four file which I need to get.

    So, long story short. HELP ME OUT! lol
    Been on this for way over 2 weeks and I am getting a bit frustrated lol. Hope someone can help me with
    this problem and walk me through this process step by step.

    If talking to me directly on MSN would help the process then no problem, I will post the solution on here
    afterwards to help other people with the same problem out.

    Have a nice (pre) weekend and thanks in forward if you are going to try to help me out ;)

    • I read that 64-bit is currently unsupported so I took the 32-bit MSI installer.
    1 Reply Last reply
    0
    • G Offline
      G Offline
      GroundZero
      wrote on 23 Jan 2012, 17:49 last edited by
      #2

      Still not found a sollution unfortunately... anyone who knows a possible sollution?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on 23 Jan 2012, 23:44 last edited by
        #3

        Looks like your %mysql% environment variable ist empty. Try to use an absolute path without any variables in it.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • G Offline
          G Offline
          GroundZero
          wrote on 24 Jan 2012, 13:52 last edited by
          #4

          well, it is still not working correctly.
          When I type in this:

          qmake "INCLUDEPATH+=e:\MYSQLínclude" "LIBS+=e:\MYSQL\lib\libmysql.lib" -o Makefile mysql.pro

          I get 3 errors all saying:

          WARNING: <internal>:1: Unescaped Backslashes are deprecated

          When I type in mingw32-make I get a longgggg list of tekst some stuff like:

          E:\Qt\QtSources\4.7.3\src\plugins\sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql,cpp:1365: undefined reference to 'mysql_list_tables@8'

          think it are about 30 errors or something like that.

          All the way down it says:

          mingw32-make: *** [debug] Error 2

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on 24 Jan 2012, 19:25 last edited by
            #5

            You should just add

            @
            LIBS+=-LE:/MYSQL/lib
            @

            not the use of forward slashes, they work just fine, qmake will translate that to native backslashes automagically.

            And of course, make sure to us the same bit width for your complete tool chain and set of libraries. You cannot mix 32 and 64 bit libs.

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • G Offline
              G Offline
              GroundZero
              wrote on 24 Jan 2012, 22:45 last edited by
              #6

              Thanks Volker, i will give this a try in the morning. I downloaded the 32-bit version of MySQL and any other thing I downloaded, even though my CPU is a 64-bit one. I read that Qt does not support 64-bit MYSQL yet.

              I will let you know if your sollution worked ;)

              1 Reply Last reply
              0
              • G Offline
                G Offline
                goetz
                wrote on 24 Jan 2012, 23:28 last edited by
                #7

                The 64bit CPUs can exeucte 32 bit code without problems, the operating system usually dont't make trouble either.

                Hm, if you have a 64 bit build of Qt, it should work with mysql too.

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  GroundZero
                  wrote on 24 Jan 2012, 23:44 last edited by
                  #8

                  Ohhh good to know Volker, thanks (again lol)!
                  I will re-download everything tomorrow and I will retry everything from scratch to make
                  sure I am using all the right stuff, and doing it the right way.

                  If by any reason the process would still fail, I will post the error here. If I succeed in installing
                  MySQL I will post it here to ;)

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    GroundZero
                    wrote on 26 Jan 2012, 21:03 last edited by
                    #9

                    Well, I did the following guys:

                    1. I reinstalled my complete computer (Windows 7 Professional 64-Bit).
                    2. I downloaded QtSDK 4.7.4 and installed it at E:\ drive
                    3. I downloaded MySQL Server 5.5 and installed it at C:\ drive
                    4. Followed the tutorial (in my 1st post) but now again, different errors.

                    Since I have been trying to get MySQL working for over a month almost, perhaps
                    someone who has experience installing MySQL with Qt on a Windows 7 machine would
                    be so kind to help me out using a tool like TeamViewer or something so he can control
                    my computer and install it for me ?

                    It would only take like 5 minutes in total. I will have all files ready which you need.

                    I hope someone would be so kind, since I am really getting frustrated about how hard
                    it can be to just get MySQL working in C++ (Qt) lol.

                    Best regards

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      aurorius
                      wrote on 21 Feb 2012, 11:49 last edited by
                      #10

                      Are you using MySQL 32 bit and Qt SDK 32 bit installer? Why don't you give us the full path for you MySQL and Qt SDK installation, maybe I can put the correct command for you to test?

                      It looks like it cannot find libmysql.lib. You can test whether you've set the %mysql% variable correctly by using

                      @cd %mysql%
                      cd lib
                      dir
                      @
                      There should be a libmysq.lib in it.

                      1 Reply Last reply
                      0

                      • Login

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