Compile IBASE plugin in QT5 for Android
-
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?
-
Did you explicitly deploy the library with your application ?
-
Good afternoon.
I come to inform you that I was able to access the remote Firebird database through Android.
Following @JoeCFD guidance I added the Firebird library to my project as follows:ANDROID_EXTRA_LIBS += libfbclient.so
I compiled it again and it is already accessing the database.
I'm from Brazil and I've been working with QT for over 10 years... but there are certain things that aren't practical and easy.
Thank you all for your collaboration!!
Now there are a few more days of work to adapt the entire application to Android.Thanks again!