I Need help in cross compiling Qt with firebird step by step
-
When you build app process takes two steps:
- compile (convert source code files to object files)
- linking (combine object files and libraries into executable or library).
"LIBS +=" basically lists libraries that must be linked into executable. If you will skip necessary library it should give you linking error and complain (try it). If it is successful everything is OK (I think). It is hard to say why it is not working - I have never compiled custom DB plugin myself. I can guess only: it is looking for DB plugin in wrong place, it fails to load plugin because of some random error (e.g. expects some other library, like glib, not enough memory or anything else). You might try catching problems like this using gdb but that might too advanced at this stage.
For now here is something I have found and I think might be useful for you:
http://qt-project.org/doc/qt-4.8/sql-driver.html -
I am trying an alternative to connect firebird with Qt. but I still encountering a problem. I am trying to use IBPP (interbase ++).
Here is my Qt with IBPP code:
#include "/ibpp/core/ibpp.h"
#include <iostream>
#include <QApplication>
#include <QtSql>
#include <QDebug>
#include <string>int main(int argc, char *argv[])
{
QApplication a(argc, argv);IBPP::Database ibpp = IBPP::DatabaseFactory("localhost","/db.fdb","SYSDBA","masterkey"); ibpp->Connect(); return a.exec();
}
But there are 3 issues:
/home/esn/SQSP/sqs-build-Desk2-Release/main.o:-1: In function `IBPP::DatabaseFactory(std::string const&, std::string const&, std::string const&, std::string const&)':
/ibpp/core/ibpp.h:874: error: undefined reference to `IBPP::DatabaseFactory(std::string const&, std::string const&, std::string const&, std::string const&, std::string const&, std::string const&, std::string const&)'
:-1: error: collect2: error: ld returned 1 exit status
-
I cannot execute this tutorial completely on how to Make Qt applications work with Firebird database: http://rongsheng007.wordpress.com/2010/08/23/make-qt-applications-work-with-firebird-database/
Can somebody test it and tell me if it is working? thanks