Opened 2 years ago
Closed 2 years ago
#66042 closed defect (fixed)
icu-devel 72.1 fails to build on 10.6.8: error: expected ':' before 'PRId64'
Reported by: | barracuda156 | Owned by: | catap (Kirill A. Korinsky) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | Cc: | ||
Port: | icu-devel |
Description
writesrc.cpp: In function 'void usrc_writeArray(FILE*, const char*, const void*, int32_t, int32_t, const char*, const char*)': writesrc.cpp:202:34: error: expected ':' before 'PRId64' 202 | fprintf(f, value<=9 ? "%" PRId64 : "0x%" PRIx64, value); | ^~~~~~~ | : writesrc.cpp:35:1: note: 'PRId64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'? 34 | #include "util.h" +++ |+#include <cinttypes> 35 | writesrc.cpp:202:35: error: 'PRId64' was not declared in this scope 202 | fprintf(f, value<=9 ? "%" PRId64 : "0x%" PRIx64, value); | ^~~~~~ writesrc.cpp:202:35: note: 'PRId64' is defined in header '<cinttypes>'; did you forget to '#include <cinttypes>'?
Identical failure on 10.6 PPC too.
Attachments (1)
Change History (4)
Changed 2 years ago by barracuda156
comment:1 follow-up: 2 Changed 2 years ago by kencu (Ken)
comment:2 Changed 2 years ago by barracuda156
Replying to kencu:
usual fix is to add this to cppflags or cxxflags:
-D__STDC_FORMAT_MACROS
Thank you! I found that, but apparently a proper fix will be change the header to <cinttypes>
: https://en.cppreference.com/w/cpp/header/cinttypes (changing header fixes the problem).
comment:3 Changed 2 years ago by catap (Kirill A. Korinsky)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
usual fix is to add this to cppflags or cxxflags: