User Tools

Site Tools


comfilepi:cplusplus:index

This is an old revision of the document!


C/C++

COMFILE Technology does not provide technical support for Visual Studio. Contact the Microsoft directly.

C/C++ (Remote Compiling)

Microsoft has had Linux software development tooling in Visual Studio since Visual Studio 2015.

The Visual Studio Linux Features do not inherently support cross-compiling on a Windows PC. Instead, Visual Studio will upload the the source files to the ComfilePi, and use the ComfilePi's toolchain to build the executable. The executable is then executed on the ComfilePi, and the Visual Studio Remote GDB Debugger attaches to it.

  1. Install Visual Studio Linux Features - How to install the Linux Development Features in Visual Studio 2015, 2017, 2019, and 2022.
  2. Create a Linux Project - How to create a new Visual Studio Project for Linux Development

For more information about using Visual Studio for Linux software development, see the Visual C++ Linux Documentation.

C++ with Qt (Cross-Compiling)

The Qt Company has released a product called Qt Visual Studio Tools to enable Qt development and cross-compiling from a Windows PC to a Linux embedded system like the ComfilePi.

See the Build and debug Qt on Linux with Qt Visual Studio Tools blog post for details

To install the latest Qt release on the ComfilePi run the following commands in a terminal:

Bullseye

sudo apt-get update
sudo apt-get install qtbase5-dev qtbase5-examples qtbase5-doc qtbase5-doc-html

Buster

sudo apt-get update
sudo apt-get install qt5-default qtbase5-examples qt5-doc qt5-doc-html qtbase5-doc-html

Additional Qt libraries can be installed using libqt5* and qt* package names.

NOTE: COMFILE Technology does not provide technical support for Qt; please contact The Qt Company for support.

<html><!–

C++ with Qt 5.8 (Cross-Compiling)

NOTE: COMFILE Technology is no longer maintaining the Qt SDK for cross-compiling from Windows to the ComfilePi. Qt can still be installed onto the ComfilePi from the Raspbian packages using the following procedure:

Buster

sudo apt-get update
sudo apt-get install qt5-default qtbase5-examples qt5-doc qt5-doc-html qtbase5-doc-html

Bullseye

sudo apt-get update
sudo apt-get install qtbase5-dev qtbase5-examples qtbase5-doc qtbase5-doc-html

NOTE: COMFILE Technology does not provide technical support for Qt; please contact The Qt Company for support.

This procedure makes use of Qt's open source distribution. Please see Qt's Licensing, FAQ, and Licensing Comparison for more information about Qt licensing.

  1. Install Qt Creator - Qt Creator is the IDE that will be used for developing Qt software.
  2. Install the ComfilePi SDK - COMFILE Technology has created an SDK that contains all necessary components for compiling and debugging ComfilePi a Qt project with a Windows PC.
  3. Test a Qt Quick Example Project - After Qt Creator and the ComfilePi SDK have been installed, open a sample project, deploy it to the Comfile Pi, and debug it from within Qt Creator
  4. Create a New Qt Quick Project - Start from scratch: Create a new project, deploy it to the Comfile Pi, and debug it from within Qt Creator
  • Modbus with Qt - The Qt Modbus component supports both Modbus RTU and Modbus TCP. Examples with Qt Widgets and Qt Quick.

For more information about software development with Qt, see the Qt documentation.

NOTE: The build of Qt used in this demonstration uses the EGLFS backend. Be sure to set the ComfilePi's GPU memory to 256MB or you may experience errors or display anomalies.

Uninstalling Qt5.8

I you do not wish to use Qt5.8 or you wish to revert to the version of Qt from the original Raspbian distribution, run the following commands to remove Qt5.8:

sudo rm -rf /opt/Qt5.8
sudo rm /etc/ld.so.conf.d/01-Qt5.8.conf
sudo ldconfig
sudo rm /etc/profile.d/qt5.8-environment.sh
sudo reboot now

–></html>

ComfilePi - Industrial Raspberry Pi Panel PC

comfilepi/cplusplus/index.1771222904.txt.gz · Last modified: by 127.0.0.1