Results 1 to 1 of 1

Thread: Using sql with jambi

  1. #1
    Join Date
    Nov 2007
    Posts
    89
    Thanked 21 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Using sql with jambi

    Hi, I'm trying to get sql work in Jambi.
    I use two drivers: QSQLITE and QMYSQL. Both are compiled in Qt library NOT as plugins (config command line: ... -qt-sql-sqlite -qt-sql-mysql ...), and both works in C++ applications.
    The problem is: when I call QSqlDatabase.addDatabase("QSQLITE") or "QMYSQL" in Jambi I get an error message "Cannot mix incompatible Qt libraries" and application exits. Even this minimal application cause that error:
    Qt Code:
    1. public static void main(String[] args) {
    2. QApplication.initialize(args);
    3. QSqlDatabase db = QSqlDatabase.addDatabase("QSQLITE");
    4. QApplication.exec();
    5. }
    To copy to clipboard, switch view to plain text mode 
    The crash is caused by native method QSqlDatabase.addDatabase(String driverName, String connectionName).

    I'll be grateful for any help.



    EDIT
    Mh... It seems that sql plugins DO NOT work in C++ applications. I'll try to recompile Qt.



    SOLVED
    There were two copies of QtCore4.dll and QtGui4.dll in another %PATH% directory. Deleted them, now applications (Java and C++) works.
    Last edited by bender86; 26th December 2007 at 13:57.

Similar Threads

  1. Jambi: Using non-standard mimetypes
    By Ron Ofir in forum Qt Programming
    Replies: 0
    Last Post: 1st August 2007, 20:19
  2. Can I use the Sql Module without chanage .pro file?
    By fengtian.we in forum Qt Programming
    Replies: 9
    Last Post: 21st May 2007, 10:59
  3. Why Jambi?
    By invictus in forum Newbie
    Replies: 1
    Last Post: 7th February 2007, 22:21
  4. We'll need a QT Jambi section!
    By GreyGeek in forum General Discussion
    Replies: 23
    Last Post: 30th September 2006, 00:38
  5. Loading jpeg (QPixmap with Qt Jambi)
    By Mr_Blonde in forum Qt Programming
    Replies: 4
    Last Post: 14th September 2006, 18:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.