Closed otavepto closed 9 months ago
Hi,
You should just add #include <cstdint>
under the #include <string>
directive :)
Yeah I just didn't want to edit the code, so I thought I might bring this to your attention. It's definitely unusual since most x86 compilers will add some default includes, Feel free to close this one, just wanted to let you know.
I highly doubt that modern compilers add includes on their own. That would completly break custom implementations. MSVC might, cause Microsoft always keeps doing stuff that break cross-platform. They call theses stuff "Extensions"... So when you create something, you compile it on MSVC, it works fine, go on GCC, it doesn't compile ;).
This is an issue not matter what. The correct fix to always add this include. I will push a fix.
Thank you
The usage of
std::uintxxx
in places, for example, like https://github.com/Nemirtingas/System/blob/0969ca178a1002ca75412b75011d52a3f85e21a4/include/System/Encoding.hpp#L59-L60Requires
#include <cstdint>
, but the lack of it fails the Github Workflow, here's an example: https://github.com/otavepto/gbe_fork/actions/runs/8127429546/job/22212242106#step:7:5313This is the build command:
And this is the error underneath it:
To workaround this, I'm adding this to the command line when invoking CMAKE:
This forces
clang
(andgcc
) to put#include "file"
at the top of each file, the docs for this compiler flag (-include
) could be found here: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.htmlStrangely enough, on my machine I'm running WSL on Windows 10 with ubuntu 22, and I have a dedicated ubuntu VM, and none of them triggered this problem.