Sign In
Upload
Download
Table of Contents
Contents
Add to my manuals
Delete from my manuals
Share
URL of this page:
HTML Link:
Bookmark this page
Add
Manual will be automatically added to "My Manuals"
Print this page
×
Bookmark added
×
Added to my manuals
Manuals
Brands
GARZ&FRICKE Manuals
Industrial PC
GUF-Yocto-34.0-r5756-0-VINCELL
User manual
Qt-Based Gui User Application - GARZ&FRICKE GUF-Yocto-34.0-r5756-0-VINCELL User Manual
Embedded computer systems
Hide thumbs
1
2
Table Of Contents
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
page
of
58
Go
/
58
Contents
Table of Contents
Bookmarks
Table of Contents
Advertisement
{
cout << "Hello World!" << endl;
return 0;
}
Edit the contents of the
Makefile
myapp: main.cpp
$(CXX) ${CXXFLAGS} -o $@ $<
$(STRIP) $@
clean:
rm -f myapp * .o * ~ * .bak
It is necessary to setup your build environment so that the complier, headers and libraries can be found. This is
done by "sourcing" a build environment configuration file. If the toolchain is installed in the default directory, this
example compiles for the target system by typing
!
$ source
/opt/guf/GUF-Yocto-34.0-r5756-0-sdk/environment-setup-vincell-guf-linux-gnueabi
,
$ make
in the
directory. The first line is needed only once as it configures the current shell and sets the necessary
myapp
environment variables.
After a successful build, the
to the target system's
/usr/bin
system]
and execute it from the device shell. It might be necessary to change the access rights of the executable
first, so that all users are able to execute it.
You can find further information about how to build applications for Yocto-based platforms at:
I
https://www.yoctoproject.org/docs/current/adt-manual/adt-manual.html
7.3 Qt-based GUI user application
Create a new directory in your home directory on the host system and change to it:
$ cd ~
$ mkdir myqtapp
$ cd myqtapp
Create the empty files
main.cpp
$ touch main.cpp myqtapp.pro
Edit the contents of the file
#include <QApplication>
#include <QPushButton>
int main(int argc, char * argv[])
{
QApplication app(argc, argv);
app.setOverrideCursor(Qt::BlankCursor);
QPushButton hello("Hello World!");
hello.setWindowFlags(Qt::FramelessWindowHint);
hello.resize(800, 480);
hello.show();
return app.exec();
}
Edit the contents of the file
as follows:
maypp
executable is created in the
directory using one of the ways described in chapter
and myqtapp.pro.
as follows:
main.cpp
as follows:
myqtapp.pro
GUF-Yocto-34.0-r5756-0
myapp
directory. You can transfer this application
VINCELL
User Manual
¡
¡
I
[
3 Accessing the target
37
Table of
Contents
Previous
Page
Next
Page
1
...
34
35
36
37
38
39
40
41
Advertisement
Table of Contents
Table of Contents
Print
Rename the bookmark
Delete bookmark?
Delete from my manuals?
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL