Monday, April 29, 2024
11
rated 0 times [  11] [ 0]  / answers: 1 / hits: 7246  / 2 Years ago, fri, june 3, 2022, 10:31:04

I'm creating a program with Qt5 and C++, and I would like to compile my program for Ubuntu Touch Preview or Ubuntu desktop arm.



I'm running those systems on Nexus 7. I have found the right C++ compiler (arm-linux-gnueabihf-g++), but how can I get Qt5 working?


More From » application-development

 Answers
7

The easy way


You can use an experimental feature of the Ubuntu SDK Alpha. The beauty of it is that you don't need to cross-compile.


First connect to your device:



  1. Plug in your device to your computer's USB port

  2. Start Qt Creator

  3. Click on the devices tab

  4. Click the Enable button to enable developer mode

  5. Go to Tools > Ubuntu > Device > Enable > Cpp compiling on Ubuntu device (experimental)


Then start hacking:



  1. Open your app's project in Qt Creator

  2. Go to Build > Ubuntu > Build C++ project on Ubuntu device (experimental)


Building C++ Touch projects on the device


And off you go! :-)


If you like a challenge


You could conceivably compile the apps on the device by hand. You might want to try the following (untested) steps:



  1. SSH into your device running the Ubuntu Touch Developer Preview



  2. Install the required development packages. Depending on what you need, you might need to add packages to the list, but here's a first shot:


    sudo apt-get install qt5-default qtbase5-dev libqt5v8-5-dev qtdeclarative5-dev libqt5xmlpatterns5-dev qtscript5-dev qttools5-dev qt3d5-dev qtmultimedia5-dev libqt5svg5-dev qtdeclarative5-dev-tools qttools5-dev-tools qtlocation5-dev qtsensors5-dev qtpim5-dev qt-components-ubuntu



  3. Build your C++ app with your build system of choice (cmake, qmake, etc...)




[#32532] Saturday, June 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
horicgly

Total Points: 36
Total Questions: 126
Total Answers: 104

Location: Iceland
Member since Thu, Dec 1, 2022
1 Year ago
;