Spinbox causes 'math.h missing' error

What do you want to achieve?

Include a Spinbox.

After creating a spinbox in Squareline studio, the compiler says:

incompatible implicit declaration of built-in function 'round' [-Wbuiltin-declaration-mismatch]
   94 | lv_spinbox_set_step( ui_ElevationSpinbox, round(pow(10, 10 - 1)) );
      |                                           ^~~~~
/Users/me/esp/Tent/main/ui/screens/ui_GeneralSettingsScreen.c:94:43: note: include '<math.h>' or provide a declaration of 'round'

What have you tried so far?

including math.h in various files.

Others

  • SquareLine Studio version:. 1.3.1
  • Operating system:. MacOs & ESP-IDF
  • Target hardware:. ESP32-S3

Ah, it really shouldn’t use math.h. We will address it in the next release.

@kisvegabor any update on this matter?

I am using Squareline Studio V1.3.3 and still see SLS generating the round, pow functions.

Notice that the Spinbox is not rounded

I’m using
Squarline Studio: V1.3.3
IDE: STM32CubeIDE

Hi,

I cc @Hermit who is responsible for Forum Q/A.

Thanks for the feedback. We’ll check out the details of this issue.