Compile IBASE plugin in QT5 for Android
-
Good Morning.
I'm trying to compile IBase plugin (Firebird 2.5.8) in QT5 for Android. I'm not getting it and I can't find documentation about it.Where can I find documentation about it?
For Windows I can generate the plugin. Only for Android I can't and I can't find documentation on how to do it.
Can anyone help with an idea?
-
@RenanHm said in Compile IBASE plugin in QT5 for Android:
Firebird 2.5.8
It is coded in C++. You build it as static(or dynamic) lib for android and link it to your app. You start it from here.
https://doc.qt.io/qt-6/android-getting-started.html or
https://doc.qt.io/qt-5/android-getting-started.htmlPost your questions if you have any issues.
-
OK. I appreciate your feedback.
I already have a Windows application developed in QT5 that accesses Firebird database.
I have already compiled this same application for Android. The application is already running on Android. But I can't access the Firebird database on Android.
I would like information or documentation on how to access a Firebird 2.5.8 database using QT5 on Android.Any suggestion?
-
Hi,
Did you already read the documentation for that driver ?
Do you have an Androïd build of the client library ? -
Hello.. here is the QT5 documentation I was looking at:
https://doc.qt.io/qt-5/sql-driver.html#qibase
I followed this documentation to generate the Ibase plugin for Windows.
But to generate the ibase plugin for Android do I need to do it on Linux?? That is, do I need linux installed on the computer?
I only have the libraries available on the Firebird website: https://firebirdsql.org/en/firebird-2-5-8/
-
No, you need to have the client libraries for Android. This is something you need to check with the FirebirdSQL folks.
-
In the link https://firebirdsql.org/en/firebird-2-5-8/ I can download the Firebird libraries... it has several libs... but I don't know how to use it in QT5 to generate the Ibase plugin.
I use Windows 10
Firebird 2.5.8
QT 5.14.2 -
you install qt source code and then
cd $QTDIR/qtbase/src/plugins/sqldrivers
build sql drivers with qt environment for android. Qt android prebuilt libs include only lib for sqlite.
Basically you do the same steps as for windows and linux. For android, you need java and clang. -
Good Morning.
OK. I'll be more technical in what I'm trying to do:I installed all QT5.14.2 with sources.. I also installed SDK, NDK, JDK for Android.
The application is working on both Windows and Android.But on Android it is not accessing the Firebird database. I'm trying to compile the ibase plugin for android.
Access the project in C:\Qt\Qt5.14.2\5.14.2\Src\qtbase\src\plugins\sqldrivers\ibase and edit the ibase.pro project, according to the attached image "ibase.png". I've tried several Firebird files, but without success.
It always returns an error, as shown in the attached image "error.png".The Android build kit is as per the attached image "kit.png".
The question is, don't I have enough Firebird libraries? (I took the ones available on the Firebird for Linux website).
Or do I need to install a linux operating system?? With QT and Firebird to generate this ibase plugin?
Thank you in advance for your attention.
-
@RenanHm said in Compile IBASE plugin in QT5 for Android:
I took the ones available on the Firebird for Linux website
I doubt they will work on Android. Also, the very first error seems to prove that: linker seems to skip the library as incompatible (can you translate the error?).
I think you need to build IBase client lib by yourself for Android. -
@RenanHm said in Compile IBASE plugin in QT5 for Android:
Does the plugin have to be built by Linux??
You can also build on Windows. What matters is: for what platform do you build? You need IBase on Android, so you need IBase client library built for Android, just like your app is built for android.
"How to build an Ibase library by myself?" - download the source code and look for documentation there. Make sure you build using Android NDK.
-
Hello.. building a driver alone I believe to be unfeasible.. I don't even know where to start.
Too bad QT is so complicated on some issues... I use Android Studio and added JayBird to connect to Firebird in an hour. Already with QT I'm trying for a few days and with no prospects of working.
I'm using Firebird 2.5.8 and 3.0 libraries... but somehow I can't compile.
Firebird version 3.0 has the arm libraries. But I noticed that it doesn't have the includes (.h). It only has the .so libraries.
Finally, do you have any other idea where my error is?
-
Firebird version 3.0 has the arm libraries. But I noticed that it doesn't have the includes (.h). It only has the .so libraries.
<== header files are the same. If you can find arm libs, you can simply copy include dir(s) for other builds(Linux or Windows) to arm build. Then you can build your app with arm libs and the include dir you copied.
It is not Qt that is complicated. It is Android which causes all troubles. It is not a great OS. But it is free. That is why it is used widely. -
hello ok. See the steps I'm doing:
-
- Download Firebird 3.0 libraries from https://firebirdsql.org/en/firebird-3-0-10/
- Download Firebird 3.0 libraries from https://firebirdsql.org/en/firebird-3-0-10/
-
When unzipping it has this tree of files and directories:
-
It does not have the header files (.h). But I get these files from another AMD64 Linux library
Download: https://firebirdsql.org/en/firebird-3-0-10/
-
Bibliotecas do Android ARM64.
-
Configuration of the QT 5.14.2 IBase Project
-
Error when compiling
This "undefined reference" error always occurs.
It looks like the libraries are not correct.Can anyone help?
I thank the attention. -
-
@JoeCFD I don't know if I understand.. But the libraries available on the Firebird website are for Android. Theoretically, some of these ".so" libs should have a reference to "isc_create_blob2" and other functions. By the name I believe it should be the lib "libfbclient.so". Correct?
-
@RenanHm Look for the first error message: in case you're using incompatible libraries the linker will tell you that.
Also, I'm not sure the way you're adding IBase libs is correct: you should use LIBS instead (https://doc.qt.io/qt-6/qmake-variable-reference.html#libs). Check the linker call to see whether the libs are really passed to the linker. -
Hello.. I managed to compile the Ibase plugin!
In the QT project, the option "armeabi-v7a" was checked and I needed to check the option "arm64-v8a". Now generated the Ibase plugin.I put the plugin "libplugins_sqldrivers_qsqlibase_arm64-v8a.so" in the folder "C:\Qt\Qt5.14.2\5.14.2\android\plugins\sqldrivers"
My Android project identified the "QIBASE" plugin with the command "QSqlDatabase::drivers()"
But I can't connect to the database at all. Even though the connection settings are correct, I can't connect to the database.Any idea of the problem?