Results 1 to 10 of 10

Thread: Problems with Qt 4.3.4 and MySql

  1. #1

    Default Problems with Qt 4.3.4 and MySql

    Hi,
    i have problems to build the mysql-plugin. I have installed Qt 4.3.4, MinGW and mysql-essential-5.0.51a-win32 on Windows Vista 32-bit. I tried to build the plugin with the "Building the QMYSQL plugin on Windows using MinGW".

    If i open the qt-prompt and insert:

    C:\Qt\Sql\lib>reimp -d libmysql.lib

    it follows the error:

    [B] Cannot find -d directory [B]


    Can anybody help me?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problems with Qt 4.3.4 and MySql

    What does the -d parameter stand for? What happens if you omit it?

  3. #3

    Default Re: Problems with Qt 4.3.4 and MySql

    The -d parameter is shown in the manual "Building the QMYSQL plugin on Windows using MinGW".
    But i will try it without -d.

  4. #4

    Default Re: Problems with Qt 4.3.4 and MySql

    Hi,
    i have reinstalled Qt, MinGW and Sql.
    I used the "Building the QMYSQL plugin on Windows using MinGW" again.
    But if i insert the following line into the comand-line:

    C:\Qt\Qt\src\plugins\sqldrivers\mysql>qmake -o Makefile "INCLUDEPATH+=C:\Qt\Sql\
    include" "LIBS+=C:\Qt\Sql\lib\opt\liblibmysql.a" mysql.pro


    I get this error:

    Der Befehl "qmake" ist entweder falsch geschrieben oder
    konnte nicht gefunden werden.


    Can anybody say me, what i forgot?

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problems with Qt 4.3.4 and MySql

    I'm not sure if I understood the German part but looks like there is no qmake in PATH. Add C:\Qt\Qt\bin to PATH or try using the "Qt Command Prompt" (there's a shortcut in Start-menu).
    J-P Nurmi

  6. #6

    Default Re: Problems with Qt 4.3.4 and MySql

    Hi,
    sorry i forgot to translate it. But you understand it correctly.
    I have set the environment variable to C:\Qt\Qt\bin.
    But i get the same error. I didn´t find the command-prompt.
    Have i run the configure.exe before, to create the libaries?

  7. #7
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problems with Qt 4.3.4 and MySql

    I thought you said you had already installed Qt as in, installed a binary package. But anyway, yes you have to actually build Qt if you grabbed a source package. See Installing Qt/Windows for more details. At the same time you can pass required options to configure script to enable MYSQL plugin. See "configure -help" for more details. Once you proceed to configure step, make sure to examine its output. You should look for something like
    MYSQL support ...... plugin
    J-P Nurmi

  8. #8

    Default Re: Problems with Qt 4.3.4 and MySql

    Ok i configured Qt with the neccessary parameters and started again to build the sql-plugin.
    I insert qmake -o Makefile....... It works.

    But if i insert mingw32-make to build
    qsqlmysql.dll and libqsqlmysql.a

    I get this error:


    C:\Qt\Qt\src\plugins\sqldrivers\mysql>mingw32-make
    mingw32-make -f Makefile.Debug all
    mingw32-make[1]: Entering directory `C:/Qt/Qt/src/plugins/sqldrivers/mysql'
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
    DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -
    DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\i
    nclude\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\include\QtSql" -I"..
    \..\..\..\include" -I"c:\Qt\Sql\include" -I"c:\Qt\Qt\include\ActiveQt" -I"tmp\mo
    c\debug_shared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\
    main.o main.cpp
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
    DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -
    DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\i
    nclude\QtCore" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\include\QtSql" -I"..
    \..\..\..\include" -I"c:\Qt\Sql\include" -I"c:\Qt\Qt\include\ActiveQt" -I"tmp\mo
    c\debug_shared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_shared\
    qsql_mysql.o ..\..\..\sql\drivers\mysql\qsql_mysql.cpp
    C:/Qt/Qt/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_CAST_TO_ASCII -DQT
    _NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -DQT_THREAD_
    SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtCore" -I"..\..\.
    .\..\include\QtSql" -I"..\..\..\..\include\QtSql" -I"..\..\..\..\include" -I"c:\
    Qt\Sql\include" -I"c:\Qt\Qt\include\ActiveQt" -I"tmp\moc\debug_shared" -I"." -I"
    ..\..\..\..\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\..\..\sql\drivers\mysql\qsq
    l_mysql.h -o tmp\moc\debug_shared\moc_qsql_mysql.cpp
    the command "C:/Qt/Qt/bin/moc.exe" is wrong
    or does not exists.

    mingw32-make[1]: *** [tmp/moc/debug_shared/moc_qsql_mysql.cpp] Error 1
    mingw32-make[1]: Leaving directory `C:/Qt/Qt/src/plugins/sqldrivers/mysql'
    mingw32-make: *** [debug-all] Error 2

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Problems with Qt 4.3.4 and MySql

    You don't have Qt installed. "configure" doesn't perform the installation, it only preconfigures Qt for building. Then you have to actually build the framework. Read the associated readme file and the wiki entry or just follow the onscreen instructions.

  10. #10
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problems with Qt 4.3.4 and MySql

    Does C:\Qt\Qt\bin\moc.exe exist or not? I guess such confusion with "/"'s and "\"'s could be caused also by having msys/cygwin in path.
    J-P Nurmi

Similar Threads

  1. Mysql drivers install problems
    By cyberboy in forum Qt Programming
    Replies: 20
    Last Post: 2nd February 2008, 14:11
  2. MySQL starting problem
    By shamik in forum General Discussion
    Replies: 5
    Last Post: 25th April 2007, 07:20
  3. Qt 4.1.4 & Mysql 5 on Linux x64
    By bothapn in forum Installation and Deployment
    Replies: 7
    Last Post: 4th August 2006, 13:23
  4. Problems building mysql plugin for Qt 4.1.2 on windows XP
    By Philip_Anselmo in forum Installation and Deployment
    Replies: 3
    Last Post: 17th May 2006, 15:38
  5. Qt 4.1 OS on Windows & mysql
    By neeko in forum Installation and Deployment
    Replies: 10
    Last Post: 31st January 2006, 20:22

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
  •  
Qt is a trademark of The Qt Company.