-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Hi there,
I've tried to build OpenD2 project on my Fedora, and reached this:
/home/username/git/d2/OpenD2/Modcode/Common/DataTables.cpp: In function ‘int DataTables_Load(const char*, void**, D2TxtLinkStrc**, size_t)’:
/home/username/git/d2/OpenD2/Modcode/Common/DataTables.cpp:65:3: error: ‘snprintf’ was not declared in this scope
65 | snprintf(szPath, MAX_D2PATH, "%s%s.bin", D2DATATABLES_DIR, szDataTableName);
| ^~~~~~~~
/home/username/git/d2/OpenD2/Modcode/Common/DataTables.cpp:2:1: note: ‘snprintf’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
1 | #include "D2Common.hpp"
+++ |+#include <cstdio>
2 |
/home/username/git/d2/OpenD2/Modcode/Common/DataTables.cpp:76:2: error: ‘snprintf’ was not declared in this scope
76 | snprintf(szPath, MAX_D2PATH, "%s%s.txt", D2DATATABLES_DIR, szDataTableName);
| ^~~~~~~~
/home/username/git/d2/OpenD2/Modcode/Common/DataTables.cpp:76:2: note: ‘snprintf’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
make[2]: *** [CMakeFiles/D2Common.dir/build.make:135: CMakeFiles/D2Common.dir/Modcode/Common/DataTables.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:147: CMakeFiles/D2Common.dir/all] Error 2
make: *** [Makefile:104: all] Error 2
-- Check for working C compiler: /usr/bin/cc
cc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)
-- Check for working CXX compiler: /usr/bin/c++
c++ (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)
I've tried to include cstdio library, but had another errors.
Metadata
Metadata
Assignees
Labels
No labels