[SOLVED] Sqlite MacDeployQt "Driver not loaded"
digitalm3 last edited by
After countless searches and dozens of recompiles i was finally able to get sqlite driver to work on my Lion and Mountain Lion workstations. Everything works as expected when i run in release and debug modes but when i run macdeployqt I see the libraries i need in the frameworks folder in the ./Contents/Frameworks folder. When i run the app on a machine without Qt installed i get a driver not loaded which is the same error i receive the many times i tried compiling Qt from src.
3072688 Sep 3 15:14 libQtCore.4.dylib
11637316 Sep 3 15:14 libQtGui.4.dylib
270916 Sep 3 15:14 libQtSql.4.dylib
I've even tried copying the sqldrivers folder to the ./Contents/PlugIns with no luck. otool shows that it's linked correctly:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 635.21.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
@executable_path/../Frameworks/libQtSql.4.dylib (compatibility version 4.8.0, current version 4.8.2)
@executable_path/../Frameworks/libQtGui.4.dylib (compatibility version 4.8.0, current version 4.8.2)
@executable_path/../Frameworks/libQtCore.4.dylib (compatibility version 4.8.0, current version 4.8.2)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
Any help would be greatly appreciated.
for anyone having this issue, i was able to resolve it by:
- create new folder in Application.app/Contents/PlugIns/sqldrivers
- copy $QT_DIR/plugins/sqldrivers/libqsqlite.dylib to the new folder
- execute macdeployqt