Results 1 to 19 of 19

Thread: cant compile mysql driver

Hybrid View

Previous Post Previous Post   Next Post Next Post
  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

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.