Thanks alot for that guide!
Followed the part on "How to build with minGW" (except that I have the complete install with the SDK and not only the sourcefiles) and when I run "mingw32-make sub-src" it starts working and continues for an hour or so and then this comes up:
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
-DQT_MOC -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC -DQT_NO_CAST_FROM_AS
CII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT
-DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTST
REAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NODLL -I"
c:\MySQL\include" -I"." -I"." -I"..\..\..\include" -I"..\..\..\include\QtCore" -
I"..\..\..\include\QtXml" -I"..\..\xml" -I"..\..\..\mkspecs\win32-g++" -o releas
e\token.o token.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
-DQT_MOC -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC -DQT_NO_CAST_FROM_AS
CII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT
-DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTST
REAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NODLL -I"
c:\MySQL\include" -I"." -I"." -I"..\..\..\include" -I"..\..\..\include\QtCore" -
I"..\..\..\include\QtXml" -I"..\..\xml" -I"..\..\..\mkspecs\win32-g++" -o releas
e\main.o main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -Wl,-subsystem,console -mthreads -Wl -o ..\..\..\bin\moc.exe release/m
oc.o release/preprocessor.o release/generator.o release/parser.o release/token.o
release/main.o -L"c:\Qt\2010.05\qt\src\tools\bootstrap\release" -lbootstrap -l
user32 -lmysql -LC:\MySQL\lib\opt
c:/qt/2010.05/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe:
cannot find -lmysql
collect2: ld returned 1 exit status
mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
mingw32-make[2]: Leaving directory `c:/Qt/2010.05/qt/src/tools/moc'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `c:/Qt/2010.05/qt/src/tools/moc'
mingw32-make: *** [sub-moc-sub_src_target_ordered] Error 2
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
-DQT_MOC -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC -DQT_NO_CAST_FROM_AS
CII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT
-DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTST
REAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NODLL -I"
c:\MySQL\include" -I"." -I"." -I"..\..\..\include" -I"..\..\..\include\QtCore" -
I"..\..\..\include\QtXml" -I"..\..\xml" -I"..\..\..\mkspecs\win32-g++" -o releas
e\token.o token.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
-DQT_MOC -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_TEXTCODEC -DQT_NO_CAST_FROM_AS
CII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT
-DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTST
REAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NODLL -I"
c:\MySQL\include" -I"." -I"." -I"..\..\..\include" -I"..\..\..\include\QtCore" -
I"..\..\..\include\QtXml" -I"..\..\xml" -I"..\..\..\mkspecs\win32-g++" -o releas
e\main.o main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -Wl,-subsystem,console -mthreads -Wl -o ..\..\..\bin\moc.exe release/m
oc.o release/preprocessor.o release/generator.o release/parser.o release/token.o
release/main.o -L"c:\Qt\2010.05\qt\src\tools\bootstrap\release" -lbootstrap -l
user32 -lmysql -LC:\MySQL\lib\opt
c:/qt/2010.05/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe:
cannot find -lmysql
collect2: ld returned 1 exit status
mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
mingw32-make[2]: Leaving directory `c:/Qt/2010.05/qt/src/tools/moc'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `c:/Qt/2010.05/qt/src/tools/moc'
mingw32-make: *** [sub-moc-sub_src_target_ordered] Error 2
To copy to clipboard, switch view to plain text mode
"cannot find -lmysql"
Have something gone wrong with the INCLUDEPATH-stuff or what? What is -lmysql exactly? A file?
************************************************** ******
When I follow what's under "How to Build the QMYSQL Plugin on Windows" I first (when running qmake) get:
c:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:\MySQL\inclu
de" "LIBS+=C:\MYSQL\lib\opt\libmysql.lib" mysql.pro
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.
c:\Qt\2010.05\qt\src\plugins\sqldrivers\mysql>qmake "INCLUDEPATH+=C:\MySQL\inclu
de" "LIBS+=C:\MYSQL\lib\opt\libmysql.lib" mysql.pro
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.
WARNING: (internal):1: Unescaped backslashes are deprecated.
To copy to clipboard, switch view to plain text mode
Do I have to do something about that? What does it mean? I need backslashes to describe the path, don't I?
And when I run nmake I get:
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_S
UPPORT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_S
QL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..
\..\..\include\QtSql" -I"..\..\..\..\include" -I"c:\MySQL\include" -I"c:\MySQL\i
nclude" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"..\..\..\..
\mkspecs\win32-g++" -o tmp\obj\debug_shared\main.o main.cpp
C:\Qt\2010.05\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_CA
ST_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\Qt
Sql" -I"..\..\..\..\include" -I"c:\MySQL\include" -I"c:\MySQL\include" -I"..\..\
..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"..\..\..\..\mkspecs\win32-g+
+" -D__GNUC__ -DWIN32 ..\..\..\sql\drivers\mysql\qsql_mysql.cpp -o tmp\moc\debug
_shared\qsql_mysql.moc
C:\Qt\2010.05\qt\bin\moc.exe är inte ett internt kommando, externt kommando,
program eller kommandofil.
NMAKE : fatal error U1077: 'C:\Qt\2010.05\qt\bin\moc.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\bin\nmake.exe"' : return code '0x2'
Stop.
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_S
UPPORT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_S
QL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..
\..\..\include\QtSql" -I"..\..\..\..\include" -I"c:\MySQL\include" -I"c:\MySQL\i
nclude" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"..\..\..\..
\mkspecs\win32-g++" -o tmp\obj\debug_shared\main.o main.cpp
C:\Qt\2010.05\qt\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_CA
ST_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\Qt
Sql" -I"..\..\..\..\include" -I"c:\MySQL\include" -I"c:\MySQL\include" -I"..\..\
..\..\include\ActiveQt" -I"tmp\moc\debug_shared" -I"..\..\..\..\mkspecs\win32-g+
+" -D__GNUC__ -DWIN32 ..\..\..\sql\drivers\mysql\qsql_mysql.cpp -o tmp\moc\debug
_shared\qsql_mysql.moc
C:\Qt\2010.05\qt\bin\moc.exe är inte ett internt kommando, externt kommando,
program eller kommandofil.
NMAKE : fatal error U1077: 'C:\Qt\2010.05\qt\bin\moc.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"D:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\bin\nmake.exe"' : return code '0x2'
Stop.
To copy to clipboard, switch view to plain text mode
and sure enough, there is no moc.exe in the Qt\bin folder. Is that wrong?
This is tricky! But I guess we're all n00bs in the beginning! =)
Extremely grateful for fast help!
Have a good one!
/Tottish
Bookmarks