ultralight-ux / Ultralight

Lightweight, high-performance HTML renderer for game and app developers.
https://ultralig.ht
4.69k stars 197 forks source link

GCC 10 compilation fails #446

Open DrJonki opened 2 years ago

DrJonki commented 2 years ago

Ubuntu 20.04, GCC 10.3.0. Ultralight version 1.3.0 (3e70dc7)

When linking Ultralight the following error appears:

.../include/Ultralight/Matrix.h:41:18: error: expected identifier before ‘alignas’
   41 |   struct UExport alignas(16) Matrix
      |                  ^~~~~~~

Using __attribute__((aligned(16))) instead of alignas(16) fixes the error:

struct UExport __attribute__((aligned(16))) Matrix
b0o commented 1 year ago

Same issue here. Your fix worked for me, thank you for sharing!