Registered Member
|
Hello. I tryed to build examples/cpp/hello-marble with Qt5. And I have some troubles. Please, help me. I am a newbie in Qt and Linux. And I am a newbie in English too, sorry if it is awkward.
cmake :
make:
|
Administrator
|
To compile Marble, you need the appropriate Qt development headers on your system - can you please check to see if all necessary Qt5 packages are installed?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
bcooksley, I used offline installator from official site. Should I Do something to view list of installed components?
My first attempt to build Marble (But not examples) and install it was successfull. But I loked dependencyes by
and got this:
libQtCore.so instead of libQt5Core.so. After that I found on my computer installed libqt4* libraries. And I tryed to remove all qt libraries. After that I reinstalled Qt5 online installer (checked all components in Qt5.2.1 to Install), removed marble, and run cmake
and got this
Qt version "5.0.2" - because I tried Qt5 from ubuntu repository. I do not know, where cmake take this options. Tell me, please, what should I do to get working inviroment. Thanks a lot for your attention an sorry for a long post. |
Administrator
|
It appears something is wrong with the installation of Qt 5 on your system - instead of using the official installer, could you try using your distribution packages instead?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Should I found .deb package for Qt5? Or what do you mean on "distribution packages"?
|
Administrator
|
Which distribution are you running, as most should now have Qt 5 packages available?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I use Ubuntu 13.10. There was Qt4. I tried to install Ubuntu SDK from repository, but it contains Qt5.0.2
lsb_release -a
|
Administrator
|
You may need to add a PPA in that case - which should contain Qt 5.1, which should be better suited.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
I can not get a working result. Sorry to bother you.
I tryed different Linux distribution, Qt distribution, built it from git... Tell me, please, what can I do (may be, manually) to let build system see Qt5? |
Registered Member
|
Hey,
I guess the point lies in providing a correct path to cmake in a flag, i.e. -DCMAKE_PREFIX_PATH=/opt/Qt/5.2.1/gcc_64/lib/cmake/ (see below). I've built Marble with Qt 5.2.1 on both Ubuntu 12.04 LTS and ArchBang recently. It's all working fine. You can try building it as I did: On Ubuntu 12.04 LTS: Download online installer for your architecture (64bit or 32bit) for qt 5.2.1 from .run http://qt-project.org/downloads and run it. Afterwards you should have Qt installed in /opt/Qt/ Get Marble:
I used git version with hash: 14ec43d447245086bbff83411e165fd973d49f39 but I don't think it matters that much.
Above is for x64, correct path to your cmake depending on your version. This will put marble library in /usr/local/lib now link your project with it and it should run. Good luck! Adam |
Registered Member
|
Thank you very much, Adam!
It was built. I will try to use it and will report about result |
Registered Member
|
I have an error when trying to use library -lmarblewidget
|
Registered Member
|
This is a linker output in your project, right?
Are you using Qt 5.2.1 or Qt 5.3.0? If it's Qt 5.3.0 and Marble was built with Qt 5.2.1 there might be a problem like this (guessing) I can only guess one of following might help: 1) Make sure you are using the right library (a version you just built) When I run
I get libmarblewidget.so.18 ⇒ /usr/local/lib/libmarblewidget.so.18 Check if this is the version that you are linking against (I had success building marble 1.8 alpha which produces this version of library) 2) Try using the same version of Qt in your project that the marble library was built against. You need to provide all necessary information about your environment, otherwise it's just guessing. Good that you are at least one step ahead now :] |
Registered Member
|
Yes, it is linker output.
If I did all right, I used Qt 5.2.1 in both cases. I will check it |
Registered Member
|
I created project with Qt5.3.0 and it built.
But I used as you sayed. May it be because Qt5.3.0 in PATH variable? I tryed to run application and got
main.cpp
|
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]