-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Steps to reproduce the issue:
cdto the root of the project.cmake -Bbuild -S.cmake --build build- The compiler then reports:
In file included from /home/shelpam/Documents/projects/bustub/src/common/util/string_util.cpp:22:
/home/shelpam/Documents/projects/bustub/src/include/common/util/string_util.h:62:26: error: ‘uint64_t’ has not been declared
62 | static auto FormatSize(uint64_t bytes) -> std::string;
| ^~~~~~~~
/home/shelpam/Documents/projects/bustub/src/include/common/util/string_util.h:1:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
+++ |+#include <cstdint>
1 | //===----------------------------------------------------------------------===//
/home/shelpam/Documents/projects/bustub/src/common/util/string_util.cpp:137:6: error: no declaration matches ‘std::string bustub::StringUtil::FormatSize(uint64_t)’
137 | auto StringUtil::FormatSize(uint64_t bytes) -> std::string {
| ^~~~~~~~~~
/home/shelpam/Documents/projects/bustub/src/include/common/util/string_util.h:62:15: note: candidate is: ‘static std::string bustub::StringUtil::FormatSize(int)’
62 | static auto FormatSize(uint64_t bytes) -> std::string;
| ^~~~~~~~~~
/home/shelpam/Documents/projects/bustub/src/include/common/util/string_util.h:23:7: note: ‘class bustub::StringUtil’ defined here
23 | class StringUtil {
A probable solution may be adding #include <cstdint> to the front of src/include/common/util/string_util.h , as the compiler hinted.
Metadata
Metadata
Assignees
Labels
No labels