I Need help in cross compiling Qt with firebird step by step
-
I guess there might be some similarities but tslib looks like special enough case http://doc.qt.digia.com/qt/qt-embedded-pointer.html to be worth documented. DB client shouldn't be problematic - the only problem in your current workflow I see currently is that you have downloaded armel library from internet. I'm not sure what's your next problem (if library was found) but the only way to solve this for you by solving problem one-by-one until you succeed.
-
I tried to set config.tests/unix/ibase/ibase.pro into
LIBS += -/fbc/usr/lib/arm-linux-gnueabiand I ran this configuration:
./configure -embedded arm -prefix /ext -xplatform qws/linux-arm-gnueabi-g++ -no-qt3support -qt-sql-ibase -v -no-webkit -no-phonon -I/fbc/usr/include/
And it actually enabled interbase as a plugin and enabled me to makefile and make install Qt.
Now, I've already compiled my code without getting any errors. and then I transferred all the libraries and all the necessary files that I think the embedded control board is needed. But when I ran the executable file on the device. it say's:
QSqlDatabase: QIBASE driver not loaded
QSqlDatabase: available drivers: QSQLITENOTE:
"executable file type: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped"I have a question regarding of what I do not know. what is the purpose
and importance of "-l" in the "LIBS += -lfbclient" and does not getting any error while configuring Qt assures that it is successful? -
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