PDA

View Full Version : cant compile mysql driver



IsoArska
30th November 2009, 17:55
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

schnitzel
30th November 2009, 18:23
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

IsoArska
30th November 2009, 18:31
Yes i have and qt prompt too the problem is somewhere in microsoft sdks

schnitzel
30th November 2009, 18:46
start the qt prompt, type 'path' and report the entire console output.
Mine is:



Setting up a MinGW/Qt only environment...
-- QTDIR set to C:\Qt\2009.03\qt
-- PATH set to C:\Qt\2009.03\qt\bin
-- Adding C:\Qt\2009.03\bin to PATH
-- Adding C:\WINDOWS\System32 to PATH
-- QMAKESPEC set to win32-g++

C:\Qt\2009.03\qt>path
PATH=C:\Qt\2009.03\qt\bin;C:\Qt\2009.03\bin;C:\Qt\ 2009.03\mingw\bin;C:\WINDOWS\System32

IsoArska
30th November 2009, 18:58
Here

Setting up a MinGW/Qt only environment...
-- QTDIR set to C:\Qt\2009.04\qt
-- PATH set to C:\Qt\2009.04\qt\bin
-- Adding C:\Qt\2009.04\bin to PATH
-- Adding C:\WINDOWS\System32 to PATH
-- QMAKESPEC set to win32-g++

C:\Qt\2009.04\qt>path
PATH=C:\Qt\2009.04\qt\bin;C:\Qt\2009.04\bin;C:\Qt\ 2009.04\mingw\bin;C:\WINDOWS\S
ystem32

schnitzel
30th November 2009, 19:19
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

IsoArska
30th November 2009, 19:48
i dont know anymore :crying::crying:
i have installed and unistalled the sdk and framework done the reimp and dlltools
and something with

c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:301: error: expected
`,' or `...' before "lpCandidate"
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:301: error: ISO C++
forbids declaration of `LPCANDIDATEFORM' with no type
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:302: error: `__in' h
as not been declared
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:302: error: expected
`,' or `...' before "lpCandidate"
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:302: error: ISO C++
forbids declaration of `LPCANDIDATEFORM' with no type
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: typedef
`REGISTERWORDENUMPROCA' is initialized (use __typeof__ instead)
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: `__in' w
as not declared in this scope
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: expected
primary-expression before ',' token
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: `__in' w
as not declared in this scope
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:315: error: expected
primary-expression before ')' token
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: typedef
`REGISTERWORDENUMPROCW' is initialized (use __typeof__ instead)
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: `__in' w
as not declared in this scope
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: expected
primary-expression before ',' token
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: `__in' w
as not declared in this scope
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:316: error: expected
primary-expression before ')' token
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:323: error: `__in' h
as not been declared
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:323: error: expected
`,' or `...' before "lpszReading"
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:323: error: ISO C++
forbids declaration of `LPCSTR' with no type
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:324: error: `__in' h
as not been declared
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:324: error: expected
`,' or `...' before "lpszReading"
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:324: error: ISO C++
forbids declaration of `LPCWSTR' with no type
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:331: error: `__in' h
as not been declared
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:331: error: expected
`,' or `...' before "lpszReading"
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:331: error: ISO C++
forbids declaration of `LPCSTR' with no type
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:332: error: `__in' h
as not been declared
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:332: error: expected
`,' or `...' before "lpszReading"
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:332: error: ISO C++
forbids declaration of `LPCWSTR' with no type
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:339: error: `__out_e
count' has not been declared
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:339: error: expected
`,' or `...' before "LPSTYLEBUFA"
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:339: error: ISO C++
forbids declaration of `nItem' with no type
c:/Program Files/Microsoft SDKs/Windows/v6.0A/Include/imm.h:340: error: `__out_e
count' has not been declared
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/2009.04/qt/src/plugins/sqldrivers/mysq

does anyone have the driver compiled ?

schnitzel
30th November 2009, 20:13
please list the contents of your mysql directory and how you are trying to build it.

IsoArska
30th November 2009, 20:24
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

C:\Qt\2009.04\qt\src\plugins\sqldrivers\mysql>mingw32-make


after qmake

Makefile,Makefile.debug, Makefile.release,
qsqlmysql_resource.rc,qsqlmysqld_resource.rc,main. cpp,mysql.pro

schnitzel
30th November 2009, 20:49
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

IsoArska
30th November 2009, 21:04
Here is in the attachement the full makefile

schnitzel
30th November 2009, 21:23
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.

IsoArska
30th November 2009, 21:29
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.
:eek:

IsoArska
30th November 2009, 21:35
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

schnitzel
30th November 2009, 21:45
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.

IsoArska
30th November 2009, 21:56
hmm...could you send me your makefile.debug file ? maby it helps

schnitzel
30th November 2009, 22:04
attached zip file contains Makefile, Makefile.debug, Makefile.release.

hope it helps

IsoArska
30th November 2009, 22:45
¨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 :cool:

schnitzel
30th November 2009, 22:51
so it worked after you replaced directories from my Makefiles? :D

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.