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:
then 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
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
@SGaist Yes, I would run the executables from the command line. For example:
$ ./HelloWorld -qws
And there's nothing showing up ? Or is the screen blacked ?
Right, there's no additional windows that pop up and the command line just moves on to the next prompt line.
That's strange, it should not do that.
Are you sure
app.exec()is called properly ?
jkern last edited by jkern
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 ?
No, how do you do that? (I'm new to Linux as well...)
groupsto know the groups your user is a member of.
ls -la /dev/fb0or
ls -la /dev/fb/0to see what permissions are set
analog adm dialout cdrom audio dip video plugdev admin
ls -la /dev/fb0 shows:
crw-rw---- 1 root video 29, 0 Jan 1 00:00 /dev/fb0
Then, you should use gdb to debug your application