Results 1 to 19 of 19

Thread: cant compile mysql driver

  1. #1
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default cant compile mysql driver

    Hey cant compile mysql plugins i got >100 errors
    What i can do ? what i am missing ?

    ihave mingw32 compiler windows xp sp2
    i had tried every tutorials and howtos but same errors come again
    pleease help i need the mysql plugin


    example:

    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:340: error: expected
    `,' or `...' before "LPSTYLEBUFW"
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:340: error: ISO C++
    forbids declaration of `nItem' with no type
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:347: error: `__in_op
    t' has not been declared
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:347: error: expected
    `,' or `...' before "lpszReading"
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:347: error: ISO C++
    forbids declaration of `LPCSTR' with no type
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:348: error: `__in_op
    t' has not been declared
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:348: error: expected
    `,' or `...' before "lpszReading"
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:348: error: ISO C++
    forbids declaration of `LPCWSTR' with no type
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:358: error: `__out_o
    pt' has not been declared
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:358: error: expected
    `,' or `...' before "lpImeParentMenu"
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:358: error: ISO C++
    forbids declaration of `LPIMEMENUITEMINFOA' with no type
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:359: error: `__out_o
    pt' has not been declared
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:359: error: expected
    `,' or `...' before "lpImeParentMenu"
    c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:359: error: ISO C++
    forbids declaration of `LPIMEMENUITEMINFOW' with no type
    mingw32-make[1]: *** [tmp/obj/debug_shared/main.o] Error 1
    mingw32-make[1]: Leaving directory `C:/Qt/4.5.3/src/plugins/sqldrivers/mysql'
    mingw32-make: *** [debug-all] Error 2
    Last edited by IsoArska; 30th November 2009 at 18:30.

  2. #2
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    did you follow these instructions:
    http://qt.nokia.com/doc/4.5/sql-driver.html

    make sure you do this from a Qt Command Prompt so that your path is correct.

    good luck

  3. #3
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    Yes i have and qt prompt too the problem is somewhere in microsoft sdks

  4. #4
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    start the qt prompt, type 'path' and report the entire console output.
    Mine is:

    Qt Code:
    1. Setting up a MinGW/Qt only environment...
    2. -- QTDIR set to C:\Qt\2009.03\qt
    3. -- PATH set to C:\Qt\2009.03\qt\bin
    4. -- Adding C:\Qt\2009.03\bin to PATH
    5. -- Adding C:\WINDOWS\System32 to PATH
    6. -- QMAKESPEC set to win32-g++
    7.  
    8. C:\Qt\2009.03\qt>path
    9. PATH=C:\Qt\2009.03\qt\bin;C:\Qt\2009.03\bin;C:\Qt\2009.03\mingw\bin;C:\WINDOWS\System32
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    Here
    Qt Code:
    1. Setting up a MinGW/Qt only environment...
    2. -- QTDIR set to C:\Qt\2009.04\qt
    3. -- PATH set to C:\Qt\2009.04\qt\bin
    4. -- Adding C:\Qt\2009.04\bin to PATH
    5. -- Adding C:\WINDOWS\System32 to PATH
    6. -- QMAKESPEC set to win32-g++
    7.  
    8. C:\Qt\2009.04\qt>path
    9. PATH=C:\Qt\2009.04\qt\bin;C:\Qt\2009.04\bin;C:\Qt\2009.04\mingw\bin;C:\WINDOWS\S
    10. ystem32
    To copy to clipboard, switch view to plain text mode 
    Last edited by IsoArska; 30th November 2009 at 19:11.

  6. #6
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    Is it possible that one of your earlier attempts messed something up?

    try to 'clean' the mysql driver folder.

    I believe you can delete everything but two files:
    main.cpp
    mysql.pro

  7. #7
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    i dont know anymore
    i have installed and unistalled the sdk and framework done the reimp and dlltools
    and something with
    Qt Code:
    1. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:301: error: expected
    2. `,' or `...' before "lpCandidate"
    3. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:301: error: ISO C++
    4. forbids declaration of `LPCANDIDATEFORM' with no type
    5. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:302: error: `__in' h
    6. as not been declared
    7. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:302: error: expected
    8. `,' or `...' before "lpCandidate"
    9. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:302: error: ISO C++
    10. forbids declaration of `LPCANDIDATEFORM' with no type
    11. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: typedef
    12. `REGISTERWORDENUMPROCA' is initialized (use __typeof__ instead)
    13. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: `__in' w
    14. as not declared in this scope
    15. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: expected
    16. primary-expression before ',' token
    17. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: `__in' w
    18. as not declared in this scope
    19. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: expected
    20. primary-expression before ')' token
    21. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: typedef
    22. `REGISTERWORDENUMPROCW' is initialized (use __typeof__ instead)
    23. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: `__in' w
    24. as not declared in this scope
    25. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: expected
    26. primary-expression before ',' token
    27. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: `__in' w
    28. as not declared in this scope
    29. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: expected
    30. primary-expression before ')' token
    31. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:323: error: `__in' h
    32. as not been declared
    33. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:323: error: expected
    34. `,' or `...' before "lpszReading"
    35. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:323: error: ISO C++
    36. forbids declaration of `LPCSTR' with no type
    37. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:324: error: `__in' h
    38. as not been declared
    39. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:324: error: expected
    40. `,' or `...' before "lpszReading"
    41. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:324: error: ISO C++
    42. forbids declaration of `LPCWSTR' with no type
    43. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:331: error: `__in' h
    44. as not been declared
    45. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:331: error: expected
    46. `,' or `...' before "lpszReading"
    47. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:331: error: ISO C++
    48. forbids declaration of `LPCSTR' with no type
    49. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:332: error: `__in' h
    50. as not been declared
    51. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:332: error: expected
    52. `,' or `...' before "lpszReading"
    53. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:332: error: ISO C++
    54. forbids declaration of `LPCWSTR' with no type
    55. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:339: error: `__out_e
    56. count' has not been declared
    57. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:339: error: expected
    58. `,' or `...' before "LPSTYLEBUFA"
    59. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:339: error: ISO C++
    60. forbids declaration of `nItem' with no type
    61. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:340: error: `__out_e
    62. count' has not been declared
    63. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:340: error: expected
    64. `,' or `...' before "LPSTYLEBUFW"
    65. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:340: error: ISO C++
    66. forbids declaration of `nItem' with no type
    67. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:347: error: `__in_op
    68. t' has not been declared
    69. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:347: error: expected
    70. `,' or `...' before "lpszReading"
    71. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:347: error: ISO C++
    72. forbids declaration of `LPCSTR' with no type
    73. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:348: error: `__in_op
    74. t' has not been declared
    75. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:348: error: expected
    76. `,' or `...' before "lpszReading"
    77. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:348: error: ISO C++
    78. forbids declaration of `LPCWSTR' with no type
    79. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:358: error: `__out_o
    80. pt' has not been declared
    81. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:358: error: expected
    82. `,' or `...' before "lpImeParentMenu"
    83. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:358: error: ISO C++
    84. forbids declaration of `LPIMEMENUITEMINFOA' with no type
    85. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:359: error: `__out_o
    86. pt' has not been declared
    87. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:359: error: expected
    88. `,' or `...' before "lpImeParentMenu"
    89. c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:359: error: ISO C++
    90. forbids declaration of `LPIMEMENUITEMINFOW' with no type
    91. mingw32-make[1]: *** [tmp/obj/debug_shared/main.o] Error 1
    92. mingw32-make[1]: Leaving directory `C:/Qt/2009.04/qt/src/plugins/sqldrivers/mysq
    To copy to clipboard, switch view to plain text mode 

    does anyone have the driver compiled ?

  8. #8
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    please list the contents of your mysql directory and how you are trying to build it.

  9. #9
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    Qt Code:
    1. C:\Qt\2009.04\qt\src\plugins\sqldrivers\mysql> qmake "INCLUDEPATH+=C:\MySQL\MySQLServer5.0\include" "LIBS+=C:\MYSQL\MySQLServer5.0\lib\opt\liblibmysql.a" mysql.pro
    2.  
    3. C:\Qt\2009.04\qt\src\plugins\sqldrivers\mysql>mingw32-make
    To copy to clipboard, switch view to plain text mode 

    after qmake
    Qt Code:
    1. Makefile,Makefile.debug, Makefile.release,
    2. qsqlmysql_resource.rc,qsqlmysqld_resource.rc,main.cpp,mysql.pro
    To copy to clipboard, switch view to plain text mode 

  10. #10
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    It is strange that the microsoft sdk is being referenced, especially since you are doing this from the Qt Command prompt.

    can you show the contents of Makefile.debug

  11. #11
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    Here is in the attachement the full makefile
    Attached Files Attached Files

  12. #12
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    Did you delete everything in the mysql folder except those two files?

    If so, then try taking out all references to MS SDK in your Makefile.debug. But now you will be really messing around - only do this as a last resort.

    When is the last time you tried reinstalling Qt SDK?

    btw: you shouldn't have to run the reimp tool, I just link the lib from mysql directly just as in the guide.

  13. The following user says thank you to schnitzel for this useful post:

    IsoArska (30th November 2009)

  14. #13
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    reinstalled about 2h ago and after that i took the references out didnt helpd and yes i have deleted all in that directory except thos 2

    and i have used the lib without reimp but no use.

  15. #14
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    do i miss some dll's or do i have the wrong version of sdk the sdk is visual studio express version i did install 6.1 version and changed the debug directories but that didnt used at all

  16. #15
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    The strange thing is the references to MS SDK in your Makefile.debug. Don't know why they are in there. I also have VS express 2008 installed, plus the 6.0A SDK, yet my makefile.debug doesn't have any references to SDK.

    Perhaps one of the gurus is kind enough to take a look at your problem - I don't have more suggestions... sorry.

  17. #16
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    hmm...could you send me your makefile.debug file ? maby it helps

  18. #17
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    attached zip file contains Makefile, Makefile.debug, Makefile.release.

    hope it helps
    Attached Files Attached Files

  19. The following user says thank you to schnitzel for this useful post:

    IsoArska (1st December 2009)

  20. #18
    Join Date
    Nov 2009
    Location
    Finland
    Posts
    12
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: cant compile mysql driver

    ¨WIPPII It Worked just changed the right directories and did reimp to libmysq.lib and copied liblibmysql.a to the qt mingw\lib directory

    Thanks so much my 12h work wasnt wasted

  21. #19
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: cant compile mysql driver

    so it worked after you replaced directories from my Makefiles?

    Good for you, but I would be cautious for future development. Something isn't right with your environment - just keep that in mind if you run into other build failures.

  22. The following user says thank you to schnitzel for this useful post:

    IsoArska (1st December 2009)

Similar Threads

  1. mysql driver not loaded after deployment
    By tpf80 in forum Newbie
    Replies: 4
    Last Post: 4th September 2011, 10:12
  2. MySQL driver , I have, it still not loaded
    By bigkoma in forum Qt Programming
    Replies: 14
    Last Post: 30th January 2011, 10:38
  3. Qt mysql driver installation problem
    By alphajoseph in forum Installation and Deployment
    Replies: 1
    Last Post: 8th February 2009, 11:56
  4. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  5. MySql plugin driver issues
    By stevey in forum Installation and Deployment
    Replies: 11
    Last Post: 20th September 2006, 13:45

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.