could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5
-
Running an application in Qt 5.15.1 in debug mode gives error.(Perfectly run in normal debug run mode only problem when to do debug run).
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgthread-2.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libglib-2.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libfyba.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libogdi.so.4.1
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libmfhdfalt.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libwoff2dec.so.1.0.2
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libxslt.so.1
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgstapp-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgstbase-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgstpbutils-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgstaudio-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgsttag-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgstfft-1.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgobject-2.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libpulse.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/liblber.so.2
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libbrotlidec.so.1
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libnss3.so
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libsmime3.so
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libplc4.so
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libfyut.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libfygm.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libwoff2common.so.1.0.2
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgmodule-2.0.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/liborc-0.4.so.0
could not find '.gnu_debugaltlink' file for /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-16.1.so
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libbrotlicommon.so.1
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libnssutil3.so
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libplds4.so
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libcap.so.2
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgdk-3.so.0
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
could not find '.gnu_debugaltlink' file for /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
could not find '.gnu_debugaltlink' file for /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so
could not find '.gnu_debugaltlink' file for /lib/x86_64-linux-gnu/libcanberra.so.0code is
#include <QApplication> #include "qgsapplication.h" #include "qgsmapcanvas.h" #include "qgsproviderregistry.h" #include <QMessageBox> #include <QDebug> int main(int argc, char *argv[]) { // 1. Create QApplication FIRST (Crucial!) QApplication a(argc, argv); // This MUST be the very first Qt-related line // 2. QGIS Application Initialization QgsApplication* qgsApp = new QgsApplication(argc, argv, true); QString prefixPath = "/usr"; // Or your actual path qgsApp->setPrefixPath(prefixPath, true); qgsApp->init(); // 3. Check Initialization (AFTER QApplication creation) if (QgsApplication::instance() == nullptr) { QMessageBox::critical(nullptr, "Error", "QGIS initialization failed!"); return 1; } QStringList providers = QgsProviderRegistry::instance()->providerList(); if (providers.isEmpty()) { QMessageBox::warning(nullptr, "Warning", "No QGIS providers found. Check prefix path."); } else { qDebug() << "Providers:" << providers; } QgsMapCanvas* mapCanvas = new QgsMapCanvas(); // Now safe to use QGIS/Qt classes if (mapCanvas == nullptr) { QMessageBox::critical(nullptr, "Error", "Failed to create map canvas."); delete qgsApp; return 1; } delete mapCanvas; // qDebug() << "QGIS Version:" << QGIS_VERSION; // Assuming you defined QGIS_VERSION in .pro QMessageBox::information(nullptr, "Success", "QGIS initialized successfully!"); // 4. Your Application Logic Here... qgsApp->exit(); return a.exec(); // Start the Qt event loop (important!) }
-
@Aman55
What error? The messages you show in your first post when debugging? There is no error. For me they did not appear when I used Qt5 under Ubuntu 22.04 but all appear when I moved to Qt6 under Ubuntu 24.04. Very irritating. I raised the issue at https://askubuntu.com/questions/1526550/ubuntu-24-04-gdb-gnu-debugaltlink-missing-file-messages. No resolution, it's a change in gdb behaviour.