Results 1 to 6 of 6

Thread: Odd Issue installing MySQL @4

  1. #1
    Join Date
    Aug 2012
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Odd Issue installing MySQL @4

    While trying to install MySql v5.5 with QtSdk 4.8.1 I have tried many of the postings and instructions.

    I get through the reimp and the dlltool steps, change directories, and run:

    qmake -o Makefile "INCLUDEPATH+=C:/MySQL5/MySQLS~1.5/include" "LIBS+=C:/MySQL5/MySQLS~1.5/lib/opt/liblibmysql.a" mysql.pro

    then:

    mingw32-make

    The first few steps procede normally and the I get the following messages (starting from the g++ command):

    g++ -mthreads -shared -Wl,--out-implib,debug\libqsqlmysqld4.a -o debug\qsqlmysqld4.dll debug/main.o debug/qsql_mysql.o d
    ebug/moc_qsql_mysql.o -L"c:\QtSDK\Desktop\Qt\4.8.1\mingw\lib" debug\qsqlmysqld_resource_res.o C:/MySQL5/MySQLS~1.5/lib/
    opt/liblibmysql.a -lQtSqld4 -lQtCored4
    Creating library file: debug\libqsqlmysqld4.a
    debug/qsql_mysql.o: In function `codec':
    C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\my sql/../../../sql/drivers/mysql/qsql_mysql.cpp:223: undefined reference
    to `mysql_character_set_name@4'
    debug/qsql_mysql.o: In function `qMakeError':
    C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\my sql/../../../sql/drivers/mysql/qsql_mysql.cpp:234: undefined reference
    to `mysql_error@4'
    C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\my sql/../../../sql/drivers/mysql/qsql_mysql.cpp:237: undefined reference
    to `mysql_errno@4'
    debug/qsql_mysql.o: In function `qMakeStmtError':
    C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\my sql/../../../sql/drivers/mysql/qsql_mysql.cpp:309: undefined reference
    to `mysql_stmt_error@4'
    C:\QtSDK\QtSources\4.8.1\src\plugins\sqldrivers\my sql/../../../sql/drivers/mysql/qsql_mysql.cpp:312: undefined reference
    to `mysql_stmt_errno@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:358:
    undefined reference to `mysql_stmt_result_metadata@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:362:
    undefined reference to `mysql_num_fields@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:369:
    undefined reference to `mysql_fetch_field@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:432:
    undefined reference to `mysql_free_result@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:438:
    undefined reference to `mysql_store_result@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:440:
    undefined reference to `mysql_free_result@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:437:
    undefined reference to `mysql_next_result@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:446:
    undefined reference to `mysql_stmt_close@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:452:
    undefined reference to `mysql_free_result@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:496:
    undefined reference to `mysql_stmt_data_seek@12'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:498:
    undefined reference to `mysql_stmt_fetch@4'
    debug/qsql_mysql.o:C:\QtSDK\QtSources\4.8.1\src\plugins\ sqldrivers\mysql/../../../sql/drivers/mysql/qsql_mysql.cpp:513:

    It continues through the entire qsql_mysql.cpp file. I'm guessing the @ is caused by unicode but I'm not sure.

    I tried using Microsofts nmake and got the same error.

    Any suggestions (careful...)

    Jim

  2. #2
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Odd Issue installing MySQL @4

    Hi,

    In windows you need to link it againts the .lib file.

    qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
    mingw32-make

    Change the paths accordingly.

  3. #3
    Join Date
    Nov 2009
    Posts
    61
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Odd Issue installing MySQL @4

    Hi JamesPK,

    Can you tell me how did you install MySql? Did you also install connector/C etc.? I am having huge problem with installing the driver. When I run reimp -d libmysql.lib in bin/opt folder I get this error: "reimp: libmysql.lib: invalid or corrupt import library".

    Also, I don't know if I am alright using 64bit Mysql with Qt which is installed in C:QtSDK. I don't know whether it is 32 or 64bit. Because mysql is 64bit so I decided to use connector/C 64 bit. However, the problem is that I cannot get through reimp, and then qmake, make etc.

  4. #4
    Join Date
    Aug 2012
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Odd Issue installing MySQL @4

    Quote Originally Posted by qlands View Post
    Hi,

    In windows you need to link it againts the .lib file.

    qmake "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MYSQL\MySQL Server <version>\lib\opt\libmysql.lib" mysql.pro
    mingw32-make

    Change the paths accordingly.
    Thanks, but no....I completely reinstalled MySQL and Qt and get the same error whether I use the liblibmysql.a file as some instructions
    suggest, or the libmysql.lib file.


    Added after 5 minutes:


    Quote Originally Posted by ZikO View Post
    Hi JamesPK,

    Can you tell me how did you install MySql? Did you also install connector/C etc.? I am having huge problem with installing the driver. When I run reimp -d libmysql.lib in bin/opt folder I get this error: "reimp: libmysql.lib: invalid or corrupt import library".

    Also, I don't know if I am alright using 64bit Mysql with Qt which is installed in C:QtSDK. I don't know whether it is 32 or 64bit. Because mysql is 64bit so I decided to use connector/C 64 bit. However, the problem is that I cannot get through reimp, and then qmake, make etc.
    I'm working with Windows7 (64bit). I've tried a number of variations of installing MySQL and all seemed to go through the reimp command ok. I've reinstalled using the community installer.
    I tried once to install a version of MySql5 on an XP(32bit) computer and got an error msg installing. I went back to the Windows7 machine.
    Last edited by JamesPK; 22nd August 2012 at 14:29.

  5. #5
    Join Date
    Aug 2012
    Posts
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Odd Issue installing MySQL @4

    Resolved......You can't use Mysql 5.5. Mysql 5.1 works. (Maybe 64 bit vs 32 bit)

  6. #6
    Join Date
    Nov 2009
    Posts
    61
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Odd Issue installing MySQL @4

    Hi JamesPK,

    Nothing worked according to documentation. I think it is incomplete. It is so incomplete that almost useless. I lost hours or even days looking for solution to include mysql plugin--unsuccessfully. I ask a few questions here (nobody was even bothered saying anything), in Qt Project there were some people who helped, and in mysql forum (I understand people might not be of use as it is more Qt problem).

    Making my mind towards building everything from sources, I have all the Qt libraries I need. I've decided to completely build Qt from sources based on Qt 4.8.2 version and MinGW 4.7.0 mainly because MinGW 4.4.x seems to be very buggy (this is what I was told in other forum). Everything is 32-bit. I've been told not to use 64-bit unless I'd have a particular reason.

    I suggest to do the same if you cannot build the plugin.
    Last edited by ZikO; 25th August 2012 at 20:25.

Similar Threads

  1. Trouble installing mysql driver
    By premroxx in forum Newbie
    Replies: 4
    Last Post: 24th June 2012, 00:57
  2. Installing MySQL drivers for QT
    By yakuzan in forum Installation and Deployment
    Replies: 3
    Last Post: 18th December 2011, 23:30
  3. installing mysql on snow leopard
    By hamid ghous in forum Installation and Deployment
    Replies: 0
    Last Post: 14th January 2010, 12:41
  4. Installing QT in windows with mysql drivers
    By roncriss in forum Installation and Deployment
    Replies: 0
    Last Post: 20th November 2009, 04:45
  5. Installing MySQL
    By MIH1406 in forum Installation and Deployment
    Replies: 2
    Last Post: 24th August 2009, 14:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.