Another reinstallation. I decided to install Qt 6 already.
The firebird components are installed as follows
Add to .bashrc
# custom PATH Qt 6 export PATH="$PATH:~/Qt/6.2.1/gcc_64/bin"
check if cmake is installed
and then as in the documentation https://doc-snapshots.qt.io/qt6-dev/sql-driver.html , only taking into account that it is SuSE
mkdir build-sqldrivers cd build-sqldrivers qt-cmake -G Ninja ~/Qt/6.2.1/Src/qtbase/src/plugins/sqldrivers -DCMAKE_INSTALL_PREFIX=~/Qt/6.2.1/gcc_64 -DInterbase_INCLUDE_DIR="/usr/include/firebird" -DInterbase_LIBRARY="/usr/lib64/libfbclient.so" cmake --build . cmake --install .
Next, we create a console project in Qt
I chose cmake
Adding SQL support
CMakeList
cmake_minimum_required(VERSION 3.14) project(TestSqlDrivers LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED ) find_package(Qt6 COMPONENTS Sql REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED) add_executable(TestSqlDrivers main.cpp ) target_link_libraries(TestSqlDrivers Qt${QT_VERSION_MAJOR}::Core Qt6::Sql)
main.cpp
#include <QCoreApplication> #include <QtSql> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); qDebug() << "Доступные драйверы:" << QSqlDatabase::drivers(); return a.exec(); }
We get in the console
10:38:28: Запускается /home/rust/Develop/build-TestSqlDrivers-Desktop_Qt_6_2_1_GCC_64bit-Debug/TestSqlDrivers ... Доступные драйверы: QList("QIBASE", "QSQLITE", "QMARIADB", "QMYSQL", "QODBC", "QPSQL")