Qt executables run without error, but nothing displays
-
I'm trying to set up my environment for cross compilation with the following setup:
Host Machine: Windows PC (x86 64 bit Windows 7), running VMware Player 7, running a guest operating system of Ubuntu 14.04. I want to develop my applications in Ubuntu.
Target: Zedboard, using a Zynq-7000 ApSoC from Xilinx. It runs on the ARM architecture (32 bit) with a Cortex-A9. On this development board, I am running a Linaro distribution from Analog Devices which is setup with some precompiled applications relevant to my project, hence I need to use this specific distribution.
I followed this tutorial to get the cross compiler set up correctly: Zynq QT Tutorial.
In Qt Creator, I created a new QT Widget Application, just hoping to verify that I'll be able to see a window appear on the Zynq platform. I compiled the program using:
qmake -project
qmake
makethen I followed the steps in that tutorial to create an image qt_lib.img to mount the qt install directory on the target machine. I mount the install directory in /usr/local/lib/zynq_qt_lib
I copy the the executable of the QT application to my SD card with the boot files/root file system for the Zedboard. I move the executable from the Boot partition of the SD card to the desktop and chmod +x to make it executable. I also use
export LD_LIBRARY_PATH=/usr/local/lib/zynq_qt_lib
otherwise I get various errors about the program not finding the linked libraries. Now when I finally run a program like this, it runs with no errors, but nothing comes up. I've actually tried this with multiple versions of Qt (4.7.3, 5.2.1, 5.3.2, 5.5 ...) with multiple different compile settings (can go into more detail if needed) and get the same result. I've also created multiple QT programs like the HelloWorld example from this video Qt HelloWorld
At this point I'm scratching my head because I feel like I've tried changing up all the different variables and keep getting this same result. Does it have to do with my distribution of Linaro?
-
Hi and welcome to devnet,
Did you try starting your application from the command line ? That might give you some additional clues about what is happening.
Hope it helps
-
And there's nothing showing up ? Or is the screen blacked ?
-
That's strange, it should not do that.
Are you sure
app.exec()
is called properly ? -
I literally haven't read anything about developing Qt programs yet. But as a trivial example, I created a Qt Widgets Application and just kept the default code. As a test, I compiled it with Qt 5.2.1 on my host machine, and it comes up with an empty window. So you would expect this same code is working on the target if cross-compiled correctly.
-
Good thinking, did you check that you have all the necessary rights to access the devices e.g. the frame buffer ?
-
groups
to know the groups your user is a member of.
ls -la /dev/fb0
orls -la /dev/fb/0
to see what permissions are set -
Looks good.
Then, you should use gdb to debug your application