Difference between revisions of "Cmake compilation trouble"
Line 1: | Line 1: | ||
Introduction: | Introduction: | ||
− | This is a tutorial for installation of Qt 5.12.5 to Ubuntu 18.04, | + | This is a tutorial for installation of Qt 5.12.5 to Ubuntu 18.04. After several attemps to compile from qtcreator and several cmake error messages (it compiles in command line), installing a fresh Qt solved the problem. This is how the error looked like. |
− | |||
− | |||
[[Image:Cmake_messages.png]] | [[Image:Cmake_messages.png]] | ||
Latest revision as of 23:08, 7 January 2021
Introduction: This is a tutorial for installation of Qt 5.12.5 to Ubuntu 18.04. After several attemps to compile from qtcreator and several cmake error messages (it compiles in command line), installing a fresh Qt solved the problem. This is how the error looked like.
So it is better to use Qt 5.12.5 as it is the last tested version that is in sync with GCompris android compilation documentation.
Installation Guide:
• Download
Download Qt 5.12.5 from here, select qt-opensource-linux-x64-5.12.5.run, the installation file will be downloaded, it will take a while. After download finishes, you will see the installation file in Downloads directory.
• Install
Using command line:
1. Go to the directory where the installation file has been downloaded: cd Downloads 2. Adjust permission rights:
chmod +x qt-opensource-linux-x64-5.12.5.run
3. Run the installer and follow the instruction to complete the installation: ./qt-opensource-linux-x64-5.12.5.run After running the last command, Qt 5.12.5 Setup window will appear:
Click next then log in with your qt account, if you don’t have a qt account you can register from here: After login to your Qt Account, click next, then you will specify the directory where Qt 5.12.5 will be installed, it is prefer to install it in /home/xxxxx/Qt5.12.5/, so you can make a new directory in home for example QtNewVersion (mkdir QtNewVersion)
After making a new directory QtNewVersion, you can specify this directory where Qt 5.12.5 will be installed by clicking Browse then click next.
Then you need to select components which you want to install. (Install all of them)
Then click next and accept the licenses to complete installing, it will take a while until installation is finished.
Qt Creator will be launched.
After launching Qt Creator, click File then Open File or Project and go to gcompris directory and open CMakeLists.txt
In the left pan of Qt Creator, right click on the project and click CMake.
After running CMake, if everything goes right, the output will be like this:
Then Finally you can run it by clicking the first green arrow: ( it takes a minute until GCompris appears don’t worry)