I just shifted to OpenSUSE 13.2 from Ubuntu. My system currently has both Qt4 and Qt5 installed. When I try to build my application against Qt5, somehow the linker is also linking my applications to some unwanted Qt4 libs.
And this is unwanted. This used to not happen when I was in Ubuntu. When I was previously using Ubuntu, even there I had both Qt4 and Qt5 installed on my system. But the application used to link only to Qt5 libs. Can anyone help me out here as to what is going wrong ?
Although I personally probably won’t be able to help much with Qt,
On general principles it might be helpful to post
The Desktop you’re using
The Development app
The compiler being used
If you have any additional repositories installed, particularly that might include their own Qt packages like KDE
If you don’t know about your repos, you can list them all with the following command
Desktop app : GNOME 3
Development app : digiKam 5.0.0 development version(which uses Qt5/Kf5)
Compiler : g++4.4
And yes I have also installed KDE frameworks 5, which requires Qt5. KF5 and Qt5 are required for digiKam 5.0.0.
The Qt4 libraries are probably pulled in by opencv, which is built against Qt4 on openSUSE 13.2.
Make sure you install opencv-qt5-devel, instead of opencv-devel. http://software.opensuse.org/package/opencv-qt5-devel
If that’s not it, there probably are more clues in the build log.
if you need to build it your self run ./configure --help in digikam5 source root and see the availoble switches, there should be a switch to chose between qt4 or qt5, do you have the qt5-devel packages installed?
imo it’s better to use the search and get prebuild packages then messing with the source
just search all the repo’s https://software.opensuse.org/
Yes, you were right. The problem was that I was using opencv-devel, which is built against Qt4. Installling opencv-qt5-devel solved the problem. Thanks for the help !! :)
I did stumble over the same problem when first creating my digikam5 package months ago (causing digikam to crash at startup because it loaded Qt4 and Qt5), that’s why I was able to guess correctly…