2009-06-26 8 views
0

Qtで開発されたWindows Mobileで簡単なSQLiteアプリケーションを実行しようとしています。しかし私はそれを管理することはできませんが、私はQtで他のWindows Mobileアプリケーションを開発しました。私は「ドライバーが見つかりません」というエラーを取得し、次のコードスニペットは、同様にそれを証明しているよう基本的なエラーは、SQLiteのドライバを見つけることができないモバイルデバイス/エミュレータです:Qtで開発されたWindows MobileアプリケーションでSQLiteを実行する方法

#include <QCoreApplication> 
#include <QSqlDatabase> 
#include <QStringList> 
#include <QtDebug> 

int main(int argc, char **argv) 
{ 
    QCoreApplication app(argc, argv); 

// returns true on mobile platform and false on desktop app. 
qDebug() << QSqlDatabase::drivers().empty(); 

} 
あなたが答えることができるならば、私は高く評価されるだろう

次のようになります。

1)Qtを構成する際に、SQLiteを使用するためにフラグを指定する必要がありますか?次のようになります。configure -qt-sql-sqlite? 何のconfigure -helpそれらのフラグのために示しています。実行時に

-qt-sql-<driver> ... Enable a SQL <driver> in the Qt Library. 
-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to 

。 mysqlの psqlの OCI ODBC TDS DB2 + sqliteの SQLite2の IBASE ( '+' でマークされたドライバは、このシステム上のように利用できる を検出されている)

し、このための: 使用可能な値Windows Ce/Mobile固有のもの:

Qt for Windows CE only: 

     -no-iwmmxt ......... Do not compile with use of IWMMXT instructions 
    + -iwmmxt ............ Do compile with use of IWMMXT instructions (Qt for Wind 
    ows CE on Arm only) 
    * -no-crt ............ Do not add the C runtime to default deployment rules 
     -qt-crt ............ Qt identifies C runtime during project generation 
     -crt <path> ........ Specify path to C runtime used for project generation. 
     -no-cetest ......... Do not compile Windows CE remote test application 
    + -cetest ............ Compile Windows CE remote test application 
     -signature <file> .. Use file for signing the target project 
     -opengl-es-cm ...... Enable support for OpenGL ES Common 
     -opengl-es-cl ...... Enable support for OpenGL ES Common Lite 
     -opengl-es-2 ....... Enable support for OpenGL ES 2.0 
    * -phonon-wince-ds9 .. Enable Phonon Direct Show 9 backend for Windows CE 

2)展開中に追加する必要があるファイル/ライブラリ/ dllファイルはありますか?

ありがとうございました。 -sql-sqliteのとパッケージを構成する再

答えて

0

は、問題を解決するのに十分な[実際に私が のconfigure -platformのwin32の-msvc2005 -xplatform wincewm60professional- msvc2005 -qt-SQL-sqliteのを入力]されます。それ以外の場合は、-plugin-sql-driverフラグで構築されます。なぜこれが機能しないのかわかりません。