cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGX designer generate and simulation compiler for c++17 standard

DTeo
Associate

TouchGFX Designer 4.17.0.

In model.hpp, I added a static inline variable for my application.

1) Run simulation compile gives error:

error: inline variables are only available with -std=c++1z or -std=gnu++1z [-Werror]

How can I add the option for this compile support?

2) How would I modify "Post Generate Command" to include the VS language option "-std=c++17":

touchgfx update_project --project-file=simulator/msvs/Application.vcxproj

  • Application.vcxproj was set to use "=std=c++17" via VS IDE.
  • However, runnning simulation will overwrite this file again.

Please advise.

3 REPLIES 3
Romain DIELEMAN
ST Employee

Hi,

For question 1, in gcc you can set it in the app.mk file (in TouchGFX/config/gcc folder).

For the second question I have no clue :grinning_face_with_sweat:. I'll try to find someone who can answer it.

/Romain

Romain DIELEMAN
ST Employee

Apparently it works fine on a colleague's pc (no over writting) with TouchGFX 4.18.1. Could you give it a try with that version ? Could you share more steps to try to reproduce it ?

/Romain

I briefly tested 4.18.1, as you mentioned, this version will not overwrite the vcxproj "c++17" setting set via MSVS.

  • So this new TGFX version could be the solution to this problem.

However, the after migration of my 4.17.0 project to 4.18.1, the run simulation button in 4.18.1 is not enabled. (Generate code button is available.)

  • Is this expected and requires a manual change to enable the run simulation button? How can I resolve this?
  • Need to evaluate further.