-
-
Notifications
You must be signed in to change notification settings - Fork 242
Description
Hi,
The Problem
The project fails to build for me on Ubuntu 23.10 using GCC 13.2.0 and CMake 3.27.4.
I'm doing a basic git check out, cmake, then make flow.
Sample error message:
/{redacted}/reactphysics3d/include/reactphysics3d/configuration.h:69:19: error: ‘int8_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
When attempting to build it outputs hundreds/thousands of errors related to this.
The Cause/Fix
The root problem seems to be because configuration.h references various standard library type definitions (std::int8_t, std::uint8_t, etc.,) but doesn't include the header they're defined in.
All of those type definitions are defined in cstdint, and so configuration.h should be modified to include this header (https://en.cppreference.com/w/cpp/header/cstdint)
I tested locally modifying the header to include cstdint with the other system headers and all errors went away and the project built successfully without issue.
Here are the problematic lines:
reactphysics3d/include/reactphysics3d/configuration.h
Lines 68 to 75 in 17dd22e
using int8 = std::int8_t; | |
using uint8 = std::uint8_t; | |
using int16 = std::int16_t; | |
using uint16 = std::uint16_t; | |
using int32 = std::int32_t; | |
using uint32 = std::uint32_t; | |
using int64 = std::int64_t; | |
using uint64 = std::uint64_t; |
Thanks!