Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Cross-compiling from Ubuntu to arm32 for Raspberry Pi(Finding the correct C++11 compiler library for arm32)
Cross-compiling from Ubuntu to arm32 for Raspberry Pi [message #1840398] Wed, 14 April 2021 10:21 Go to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
I am currently cross-compiling code that already compiles and works fine on my 4diac/FORTE under Ubuntu 18.10 (64-bit Linux)

However, the standard libraries suggested in the 4diac documentation for cross-compiling for the Raspberry Pi are not for c++11. While a lot of my existing code is compiling fine, I am getting errors like this when I cross-compile:

/home/badger/org.eclipse.4diac.forte/ExportedFBs/HVAC_Pi/Z_DISPLAY3.h:70:9: error: 'constexpr' does not name a type
static constexpr const char* END_OF_PACKET = "&";
^
/home/badger/org.eclipse.4diac.forte/ExportedFBs/HVAC_Pi/Z_DISPLAY3.h:70:9: note: C++11 'constexpr' only available with -std=c++11 or -std=gnu++11

The current libraries I am using are shown inside CMake in the attachment.

Does anyone know the correct C++ libraries I should be using for C++ 11?

Thank you,
Barry

[Updated on: Wed, 14 April 2021 10:24]

Report message to a moderator

Re: Cross-compiling from Ubuntu to arm32 for Raspberry Pi [message #1840402 is a reply to message #1840398] Wed, 14 April 2021 12:56 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Great that you could get it running. The problem is not a library issue. We are constantly trying to improve the code quality of 4diac FORTE and by that also using more and more modern C++. In order get it working you need to add the "-std=c++11" (without the quotes) to your c++ compiler flags.
Re: Cross-compiling from Ubuntu to arm32 for Raspberry Pi [message #1840419 is a reply to message #1840402] Wed, 14 April 2021 20:44 Go to previous messageGo to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Thank you Alois,

I woke up in the night thinking it must be something like that. I will let you know how it works out.

FYI - I got the temperature sensor talking to FORTE over the weekend on my Raspberry Pi. I used a different approach than QX/IX that involved Linux device drivers. FORTE was very happy to run it.

I plan to document it as a tutorial and post it here soon. The solution was much simpler than my original approach and looks to be highly portable.

Regards,
Barry
Re: Cross-compiling from Ubuntu to arm32 for Raspberry Pi [message #1840451 is a reply to message #1840419] Thu, 15 April 2021 14:39 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Happy to hear that it was easier then expected.
Previous Topic:Compute now F_MOD value by triggered event
Next Topic:Watch Values in own application results in TCP reset
Goto Forum:
  


Current Time: Thu Apr 25 11:10:17 GMT 2024

Powered by FUDForum. Page generated in 0.03465 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top