QtCipherSqlitePlugin icon indicating copy to clipboard operation
QtCipherSqlitePlugin copied to clipboard

Qt windows static link

Open sredouane opened this issue 9 years ago • 3 comments

Hi, i have a problem use the plugin statically linked on Qt-5.5 static windows. the function QSqlDatabase::isDriverAvailable("SQLITECIPHER") return false.

it does run fine on Qt MacOSX(static) and Qt Windows(dynamic). the function QSqlDatabase::isDriverAvailable("SQLITECIPHER") return true on both of them, and i can create tables insert records....

in my .pro filei have: QTPLUGIN += sqlitecipher macx:LIBS += -L/usr/local/Qt-5.5.1/plugins/sqldrivers -lsqlitecipher win:LIBS += C:\qt-5.5-x64-source\qtbase\plugins\sqldrivers/sqlitecipher.lib in my main.cpp file i have:

Q_IMPORT_PLUGIN(SqliteCipherDriverPlugin)

any idea why it does run on Qt static macosx and not on windows.

thanks.

sredouane avatar Nov 16 '16 17:11 sredouane

I'm sorry for your trouble.

But I'm not sure about this problem, for I haven't used in static links for now. Maybe we could check it together to make it better. If you have any idea, please let me know.

Thank you!

Best regards,

Cheng Liang Nanjing, China http://www.devbean.net


发件人: Redouane Semghouni [email protected] 发送时间: 2016年11月17日 1:08:55 收件人: devbean/QtCipherSqlitePlugin 主题: [devbean/QtCipherSqlitePlugin] Qt windows static link (#6)

Hi, i have a problem use the plugin statically linked on Qt-5.5 static windows. the function QSqlDatabase::isDriverAvailable("SQLITECIPHER") return false.

it does run fine on Qt MacOSX(static) and Qt Windows(dynamic). the function QSqlDatabase::isDriverAvailable("SQLITECIPHER") return true on both of them, and i can create tables insert records....

in my .pro filei have: QTPLUGIN += sqlitecipher macx:LIBS += -L/usr/local/Qt-5.5.1/plugins/sqldrivers -lsqlitecipher win:LIBS += C:\qt-5.5-x64-source\qtbase\plugins\sqldrivers/sqlitecipher.lib in my main.cpp file i have: #include Q_IMPORT_PLUGIN(SqliteCipherDriverPlugin)

any idea why it does run on Qt static macosx and not on windows.

thanks.

― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/devbean/QtCipherSqlitePlugin/issues/6, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABFtUds-hHb54rmmatfYhc7ZKINJGjlzks5q-zingaJpZM4K0J8v.

devbean avatar Nov 17 '16 02:11 devbean

here is my fix: i did add TEMPLATE = lib CONFIG += plugin target.path += $$[QT_INSTALL_PLUGINS]/sqldrivers INSTALLS += target QT *= core sql to the SQLITECIPHER pro file.

and i did add DEFINES+=QT_STATICPLUGIN to myproject.pro and i did add Q_IMPORT_PLUGIN(SqliteCipherDriverPlugin) in my main.cpp

so every thing work on both static and dynamic mac and windows

sredouane avatar Nov 17 '16 16:11 sredouane

Really appreciate for your work. If it works, please send me a pull request for this issue. Thanks again.

Best regards,

Cheng Liang Nanjing, China http://www.devbean.net


发件人: Redouane Semghouni [email protected] 发送时间: 2016年11月18日 0:48:15 收件人: devbean/QtCipherSqlitePlugin 抄送: Cheng Liang; Comment 主题: Re: [devbean/QtCipherSqlitePlugin] Qt windows static link (#6)

here is my fix: i did add TEMPLATE = lib CONFIG += plugin target.path += $$[QT_INSTALL_PLUGINS]/sqldrivers INSTALLS += target QT *= core sql to the SQLITECIPHER pro file.

and i did add DEFINES+=QT_STATICPLUGIN to myproject.pro and i did add Q_IMPORT_PLUGIN(SqliteCipherDriverPlugin) in my main.cpp

so every thing work on both static and dynamic mac and windows

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/devbean/QtCipherSqlitePlugin/issues/6#issuecomment-261300694, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABFtUcKAap2-W3gbFvZcsT51hXqWvGgMks5q_IVPgaJpZM4K0J8v.

devbean avatar Nov 18 '16 03:11 devbean