Qt RaspberryPi 3B cross compile
-
Hi,
I use Linux Ubuntu 18.04. I set up environment like in this article:
https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/
I can build project but when i try run it i get error:
"Failed to create remote directories: mkdir: cannot create directory '/opt/my_program': Permission denied"
I don't know what this may be caused by. Would someone be able to help me?
-
Hi,
/opt is not writable by standard users. You should install it elsewhere while developing.
-
I have been cross compiling ( for RPi ) using different IDE and very obscure 3r party software . It is not much fun dodging Linux "security"
Would this help ?
Cheers
-
@Creatorczyk said in Qt RaspberryPi 3B cross compile:
how I could make it work?
You may need to change your project slightly, as @SGaist mentioned, to deploy to a place where the user connecting from Qt Creator has indeed right permissions. Relevant fragment from this good tutorial:
If you picked the same project type that I did, you'll need to add some lines to the qmake project file so that qmake knows what files must be deployed to the target system to run the application. An easy way to do this is to edit (from Qt Creator) the project file and add these lines at the bottom:
INSTALLS = target target.files = widgettest target.path = /home/pi
-
Hello,
I have got the same issue and I solve it by:
1- in .pro :
target.path = /home/root #root is the name of the folder you want to create
INSTALLS += target
2- See the picture (I have written the name of executable )
![0_1623311567273_qt_response.PNG](Uploading 52%)That's worked for me.