NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Linux RT C++ GUI Application

I'm extremely interested of the ways to build C++ app on CompactRIO with Embedded UI.

But I struggle to find any topics about it.

Will be very grateful to see tutorials or examples to how do I do that. Thanks in advance.

0 Kudos
Message 1 of 7
(4,705 Views)

I would recommend finding a reasonable guide that's targeted to general Linux GUI development and install the development package for the appropriate UI framework that you want to use. It may be the case that the package that you need does not have a -dev (development package) available in the NI package feed, in which case you may need to build and install the UI framework, either through OpenEmbedded (github.com/ni/nilrt) or from the source itself from that project's source download.

Message 2 of 7
(4,136 Views)

In addition to what BradM already mentioned I would like to recommend the following C++ toolkits:

  • GTK+ (http://www.gtk.org/) - this is the widget toolkit used by Xfce which is the desktop manager in Embedded UI. This has the advantage that the libraries you will need on the target are likely already installed.
  • Qt (https://www.qt.io/developers/) - nice looking widget toolkit (one of my personal favorites). Unfortunately looking at the 2016 feeds only an older version is available for install: 4.8.6. However it is not very hard to build from source.
Message 3 of 7
(4,136 Views)

Thanks guys! Really appreciate your help. I'll probably look for the Qt since I'm alreadty familiar with it.

0 Kudos
Message 4 of 7
(4,136 Views)

Regarding to this topic(https://decibel.ni.com/content/message/141117) it seems that build Qt from the source will get me to some problems. The easiest way for me might be just using Qt4.8.6. But out of pure curiosity, will these problems be solved if I use OE to build the package?

0 Kudos
Message 5 of 7
(4,136 Views)

It will solve some of the issues noted in the other topic but bring with it the pains of working with OE. That's where the packages came from, likely they are the most recent version in the OE layer collection used to build the OS that you're using, and would need to have a more recent version of Qt pointed to. It could just work without issue but I would expect that you're going to run into some issues attempting to point to a more recent version of Qt and building that.

0 Kudos
Message 6 of 7
(4,136 Views)

@gratian.crisan wrote:

In addition to what BradM already mentioned I would like to recommend the following C++ toolkits:

  • Qt (https://www.qt.io/developers/) - nice looking widget toolkit (one of my personal favorites). Unfortunately looking at the 2016 feeds only an older version is available for install: 4.8.6. However it is not very hard to build from source.

Building Qt for embedded targets is *NOT* easy.

Especially if you're not going throw X window, but directly to an DRM device (which is the common case in embedded world). Embedded is not PC/Desktop.

 

Despite the certain salesmen PR, Qt is not at all made for embedded systems.

In Qt5 (where the already bad code quality degraded even more) there're just horrible hacks for DRM, which depend on certain broken-by-design drivers/gl-libs (the most insane IMHO is freescale), which themselves are just unstable toys.  

 

So, if you *really* want Qt, take the already packaged one from your target's distro and be prepared that it might miss features from the desktop version.

And you should be aware, that it's very resource hungry and slow.

 

Think carefully whether you really wanna open that can of worms.

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 7 of 7
(3,838 Views)