Qt SVG isn't working on Ubuntu with Qt 6
-
I'm writing a program for Ubuntu in Qt 6 which uses Qt SVG. When I try to run it I get the following error:
error while loading shared libraries: libQt5Svg.so.5: cannot open shared object file: No such file or directory
So I tried this:
sudo apt-get install libqt6svg6*
But it didn't help, I still get the same error. So I tried this:
sudo apt-get install libqt5svg5*
Now I get a different error:
symbol lookup error: ./FeynmanDiagramEditor: undefined symbol: _ZdlPvm, version Qt_5
This is weird because I'm using Qt 6, so it shouldn't care about Qt 5.
How do I get this to work?
-
Provide a minimal, compilable example.
It seems like it was a caching issue. I solved it by deleting the build directory and re-compiling. Thanks for your help.
-
I'm writing a program for Ubuntu in Qt 6 which uses Qt SVG. When I try to run it I get the following error:
error while loading shared libraries: libQt5Svg.so.5: cannot open shared object file: No such file or directory
So I tried this:
sudo apt-get install libqt6svg6*
But it didn't help, I still get the same error. So I tried this:
sudo apt-get install libqt5svg5*
Now I get a different error:
symbol lookup error: ./FeynmanDiagramEditor: undefined symbol: _ZdlPvm, version Qt_5
This is weird because I'm using Qt 6, so it shouldn't care about Qt 5.
How do I get this to work?
@Donald-Duck said in Qt SVG isn't working on Ubuntu with Qt 6:
This is weird because I'm using Qt 6, so it shouldn't care about Qt 5.
But you use a (dependent) library which is using Qt5 (svg module)
How do I get this to work?
Don't use the lib which depends on Qt5 but the correct one which is using Qt6.
-
@Donald-Duck said in Qt SVG isn't working on Ubuntu with Qt 6:
This is weird because I'm using Qt 6, so it shouldn't care about Qt 5.
But you use a (dependent) library which is using Qt5 (svg module)
How do I get this to work?
Don't use the lib which depends on Qt5 but the correct one which is using Qt6.
@Christian-Ehrlicher How am I using a library that uses Qt 5? I just installed Qt right now, and I only installed Qt 6, I didn't install anything that uses Qt 5. What else do I need to do?
-
@Christian-Ehrlicher How am I using a library that uses Qt 5? I just installed Qt right now, and I only installed Qt 6, I didn't install anything that uses Qt 5. What else do I need to do?
@Donald-Duck said in Qt SVG isn't working on Ubuntu with Qt 6:
What else do I need to do?
How should we know? The only thing we see is that your app is using a Qt5 library. You have to fix it. We don't have any code nor a simple reproducer.
-
@Donald-Duck said in Qt SVG isn't working on Ubuntu with Qt 6:
What else do I need to do?
How should we know? The only thing we see is that your app is using a Qt5 library. You have to fix it. We don't have any code nor a simple reproducer.
@Christian-Ehrlicher How can I figure out why my app is using a Qt 5 library? I didn't do anything related to Qt 5. All I did was install Qt 6 from here (and only selecting things related to Qt 6 in the installer). I installed it on a clean WSL installation, so I don't have anything related to Qt 5 from previously. In my .pro file, all I have is
QT += svg
, with no reference to Qt 5. -
@Christian-Ehrlicher How can I figure out why my app is using a Qt 5 library? I didn't do anything related to Qt 5. All I did was install Qt 6 from here (and only selecting things related to Qt 6 in the installer). I installed it on a clean WSL installation, so I don't have anything related to Qt 5 from previously. In my .pro file, all I have is
QT += svg
, with no reference to Qt 5.Provide a minimal, compilable example.
-
Provide a minimal, compilable example.
It seems like it was a caching issue. I solved it by deleting the build directory and re-compiling. Thanks for your help.
-