PDA

View Full Version : Building odbc driver in Qt 5.0.1



keti
25th March 2013, 10:56
Hi guys,

I am using Windows and installed Qt 5.0.1. I need to use qodbc but found out that the only available driver is qsqlite so I downloaded the qtbase source (qtbase-opensource-src-5.0.1) for me to compile the odbc.pro and generate the dll for odbc.

I put the qtbase-opensource-src-5.0.1 in C:/Qt/Qt5.0.1/5.0.1. I opened the odbc project file located at C:/Qt/Qt5.0.1/5.0.1/src/plugins/sqldrivers/odbc.

The build directory is at:
C:\Qt\Qt5.0.1\5.0.1\qtbase-opensource-src-5.0.1\src\plugins\sqldrivers\odbc-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug

I was able to build the odbc project without any issue. But then, no odbc.dll was created. Should I expect it to be in the build directory?

When I checked the build directory, only the following files are in there:
- Makefile
- Makefile.Debug
- Makefile.Release
- .moc/debug_shared/main.moc
- .moc/debug_shared/moc_qsql_odbc.cpp
- .moc/release_shared/main.moc
- .moc/release_shared/moc_qsql_odbc.cpp
- .obj/debug_shared/main.o
- .obj/debug_shared/moc_qsql_odbc.o
- .obj/debug_shared/qsql_odbc.o
- .obj/release_shared/main.o
- .obj/release_shared/moc_qsql_odbc.o
- .obj/release_shared/qsql_odbc.o

Should I put the source file somewhere else?

I hope someone can help me on this. :)

Regards,
keti

Ashkan_s
25th March 2013, 15:49
I've never tried this way, i.e getting source code separately. I've Just compiled from
C:\Qt\Qt5.0.1\5.0.1\Src\qtbase\src\plugins\sqldriv ers\odbc and the plugin was created under
C:\Qt\Qt5.0.1\5.0.1\Src\qtbase\plugins\sqldrivers.

Just a guess, check C:\Qt\Qt5.0.1\5.0.1\qtbase-opensource-src-5.0.1\plugins\sqldrivers

Anyway you can search for a dll named qsqlodbc.dll