little error when compiling from source with cmake

Started by Nafffen, 22 June 2023, 10:55:32

Nafffen

Hello,
I was trying to build TGUI from source with cmake:
FetchContent_Declare(
  tgui
  GIT_REPOSITORY https://github.com/texus/TGUI
  GIT_TAG v1.0-beta
)
set(TGUI_BACKEND SFML_GRAPHICS)
FetchContent_MakeAvailable(tgui)

With compiler: winlibs-x86_64-posix-seh-gcc-13.1.0-mingw-w64msvcrt-11.0.0-r5
On Windows 10 64bits
With set(CMAKE_CXX_STANDARD 20)

I have got some errors in Utf.hpp file,
error: 'uint8_t' is not a member of 'std'; did you mean 'wint_t'?     
   66 |             std::uint8_t firstByteMask;

After some research, I just added #include <cstdint> on top of the file and everything goes well

Just to let you know

Nafffen

It's seems that it's due to gcc 13.1, a lot of libraries are getting this error too

texus

This issue was fixed last month (https://github.com/texus/TGUI/pull/195/files), but there haven't been any new manual tags since then. (I'm planning on releasing a v1.0-rc soon, but I can't say yet if it will happen in the next days or if it still takes a few weeks).

So for now you may have to rely on the "nightly_build" tag instead of "v1.0-beta"