I don't know how much googeling you did but in the last minute I invested out of curiosity I found Qt database drivers and MySQL Connector C++.
I don't know how much googeling you did but in the last minute I invested out of curiosity I found Qt database drivers and MySQL Connector C++.
[wiki]Building the Database Plugins for QtSDK Users[/wiki]
Last edited by ChrisW67; 24th May 2012 at 08:05.
codeartist (24th May 2012)
Thanks for the replies guys.
I really appreciate the help.
@ChrisW67: Can you please help me out in figuring out this problem. I need it urgently to submit my project in college. I am stuck at this point. It's too frustating. I have installed Qt 4.7.3 SDK in /home/pkr/QtSDK/....
Now after getting some response from different forum I have downloaded the sources file from here (4.8.2). Now I am not able to understand anything how to install it. Please help me out. I need the help and not able to understand anything. I will be greatful to you![]()
Reminds me of some wise words, "Lack of planning on your part does not constitute an emergency on my part"@ChrisW67: Can you please help me out in figuring out this problem. I need it urgently to submit my project in college.
I'll highlight the section from the wiki page I wrote and linked to because I am tired of answering this question:
Now, since you did not follow the instructions you are in a slightly different position. Unpack the source code you downloaded separately to anywhere you like. Let's say you end up with "C:\qt-everywhere-opensource-src-4.8.2" containing a few files and a bunch of directories. Just so there is no confusion, its content looks like this:The first item most people notice is that the documentation refers to the Qt source at a folder called "%QTDIR%\src\plugins\sqldrivers\..." and that no such directory exists in your Qt SDK. The Qt SDK does not, by default, install the Qt source code, just a compiled version suitable for a particular compiler tool chain (MingW or MSVC). So, the first thing you need to do is download the Qt source code matching the binary version you have installed already. You do this using the Qt SDK Maintenance Tool.
That directory is the equivalent of "%QTDIR%" in the documentation on building the database plugins and on the wiki page. Everything else is just following the instructions.Qt Code:
bin configure examples LGPL_EXCEPTION.txt LICENSE.LGPL README translations changes-4.8.2 configure.exe imports lib mkspecs src util config.profiles demos include LICENSE.FDL projects.pro templates config.tests doc INSTALL LICENSE.GPL3 qmake toolsTo copy to clipboard, switch view to plain text mode
Also, the source code for Qt 4.8.2 you downloaded does not match the binary version of Qt you told us you were using, that is 4.7.3, in your first post. You might get away with it using this source, or you could obtain the correct source using the Qt SDK Maintenance Tool as directed.
Last edited by ChrisW67; 24th May 2012 at 23:55.
Really very much thanks! You are great!
Thanks for helping a novice like me. I will try not to commit such mistake again
Thanks![]()
C:\QtSDK\QtSources\473\src\plugins\sqldrivers\mysq l>mingw32-make
This is the problem I am getting after I executed mingw32-make.mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/QtSDK/QtSources/473/src/plugins/sqldrive
rs/mysql'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -
DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_H
AVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtCor e"
-I"c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtSql " -I"c:\QtSDK\Desktop\Qt\4.7.3\m
ingw\include" -I"c:\Program" -I"Files\MySQL\MySQL" -I"Server" -I"5.5\include" -I
"c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\Activ eQt" -I"debug" -I"c:\QtSDK\Desktop
\Qt\4.7.3\mingw\mkspecs\default" -o debug\main.o main.cpp
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.h:52:19: error: mysql.h: No such file or d
irectory
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.h:108: error: expected ')' before '*' toke
n
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make[1]: Leaving directory `C:/QtSDK/QtSources/473/src/plugins/sqldriver
s/mysql'
mingw32-make: *** [debug] Error 2
@Chris: Can you please help me in this?
Bookmarks