Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix missing include #215

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

skiminki
Copy link

@skiminki skiminki commented Sep 5, 2023

network.h uses fixed-width integer types without including <cstdint>, causing a compilation error on Ubuntu 23.10 (GCC 13.2). Fix this.

Bench: 1877660


The error in question is:

g++ -DEVALFILE=\"defaultnet.nn\" -std=c++17 -Wall -Wextra -O3 -DNDEBUG -flto -march=native *.cpp -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -o Bit-Genie 
In file included from position.h:19,
                 from history.h:21,
                 from search.h:21,
                 from benchmark.cpp:19:
network.h:54:17: error: 'uint32_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
   54 |     static std::uint32_t get_hash() {
      |                 ^~~~~~~~
      |                 wint_t

repeated couple of times.

Note: Including <stdint.h> didn't work for me, since that doesn't add the typedefs in namespace std.

In general, it would likely be better to include <cstdint> (and similar) instead of the respective C headers.

network.h uses fixed-width integer types without including <cstdint>,
causing a compilation error on Ubuntu 23.10 (GCC 13.2). Fix this.

Bench: 1877660
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant