Hi All.
I have a problem with building mysql driver for Qt under windows.i cannot build dll .
i do follow steps. but after step 3 i.e after nmake i get such error
Qt Code:
  1. link /LIBPATH:"c:\Qt\4.3.0-msvc2005\lib" /LIBPATH:"c:\Qt\4.3.0-msvc2005\
  2. lib" /NOLOGO /DEBUG /DLL /MANIFESTFILE:"tmp\obj\debug_shared\qsqlmysqld.intermed
  3. iate.manifest" /incremental:no /OUT:"..\..\..\..\plugins\sqldrivers\qsqlmysqld4.
  4. dll" @C:\DOCUME~1\COMP\LOCALS~1\Temp\nm8B.tmp
  5. Creating library ..\..\..\..\plugins\sqldrivers\qsqlmysqld4.lib and object ..
  6. \..\..\..\plugins\sqldrivers\qsqlmysqld4.exp
  7. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_fetch_field re
  8. ferenced in function "public: bool __thiscall QMYSQLResultPrivate::bindInValues(
  9. void)" (?bindInValues@QMYSQLResultPrivate@@QAE_NXZ)
  10. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_num_fields ref
  11. erenced in function "public: bool __thiscall QMYSQLResultPrivate::bindInValues(v
  12. oid)" (?bindInValues@QMYSQLResultPrivate@@QAE_NXZ)
  13. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_stmt_result_me
  14. tadata referenced in function "public: bool __thiscall QMYSQLResultPrivate::bind
  15. InValues(void)" (?bindInValues@QMYSQLResultPrivate@@QAE_NXZ)
  16. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_stmt_close ref
  17. erenced in function "protected: void __thiscall QMYSQLResult::cleanup(void)" (?c
  18. leanup@QMYSQLResult@@IAEXXZ)
  19. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_store_result r
  20. eferenced in function "protected: void __thiscall QMYSQLResult::cleanup(void)" (
  21. ?cleanup@QMYSQLResult@@IAEXXZ)
  22. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_next_result re
  23. ferenced in function "protected: void __thiscall QMYSQLResult::cleanup(void)" (?
  24. cleanup@QMYSQLResult@@IAEXXZ)
  25. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_free_result re
  26. ferenced in function "protected: void __thiscall QMYSQLResult::cleanup(void)" (?
  27. cleanup@QMYSQLResult@@IAEXXZ)
  28. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_fetch_row refe
  29. renced in function "protected: virtual bool __thiscall QMYSQLResult::fetch(int)"
  30. (?fetch@QMYSQLResult@@MAE_NH@Z)
  31. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_data_seek refe
  32. renced in function "protected: virtual bool __thiscall QMYSQLResult::fetch(int)"
  33. (?fetch@QMYSQLResult@@MAE_NH@Z)
  34. qsql_mysql.obj : error LNK2019: unresolved external symbol _mysql_stmt_fetch ref
  35. erenced in function "protected: virtual bool __thiscall QMYSQLResult::fetch(int)
To copy to clipboard, switch view to plain text mode 

1.cd %QTDIR%\src\plugins\sqldrivers\mysql
2.qmake -o Makefile "INCLUDEPATH+=C:\MySQL\include" "LIBS+=C:\MySQL\lib\opt\libmysql.lib" mysql.pro
3.nmake

p.s this is my environment variables.
lib
C:\Program Files\SQLXML 4.0\bin\;C:\Program Files\Microsoft Visual Studio 8\VC\lib;C:\Qt\4.3.0-msvc2005\lib;C:\mysql\lib\opt;
Include
C:\Program Files\Microsoft Visual Studio 8\VC\include;C:\mysql\include;
path
C:\Program Files\Microsoft Visual Studio 8\VC\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Progr am Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\WINDOWS\system 32;C:\Qt\4.3.0-msvc2005\bin;C:\MinGW\bin;C:\mysql\bin;

QMAKESPEC
win32-msvc2005

QTDIR
C:\Qt\4.3.0-msvc2005

my qt version is
qt-win-opensource-src-4.3.0.zip,mysql5,