ninja: Entering directory `out/
Static'
[
1/
809] compile ../../third_party/externals/icu/source/common/appendable.cpp
FAILED: obj/third_party/externals/icu/source/common/libicu.appendable.o
c++ -MD -MF obj/third_party/externals/icu/source/common/libicu.appendable.o.d -DU_COMMON_IMPLEMENTATION -DU_STATIC_IMPLEMENTATION -DU_ENABLE_DYLOAD=
0 -DU_I18N_IMPLEMENTATION -D_XOPEN_SOURCE=
0 -DSK_TRIVIAL_ABI=\[\[clang::trivial_abi\]\] -DU_USING_ICU_NAMESPACE=
0 -DU_DISABLE_RENAMING -DSK_USING_THIRD_PARTY_ICU -w -Wno-attributes -ffp-contract=
off -fstrict-aliasing -fPIC -fvisibility=hidden -g -gdwarf-
4 -I/usr/local/include -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -O3 -fdata-sections -ffunction-sections -isystem /usr/home/hodong/skia/third_party/externals/icu/source/common -isystem /usr/home/hodong/skia/third_party/externals/icu/source/i18n -isystem /usr/home/hodong/skia/third_party/icu -std=c++
17 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -frtti -c ../../third_party/externals/icu/source/common/appendable.cpp -o obj/third_party/externals/icu/source/common/libicu.appendable.o
../../third_party/externals/icu/source/common/appendable.cpp:
40:
24:
error: use
of undeclared identifier
'FALSE'
return FALSE;
^
../../third_party/externals/icu/source/common/appendable.cpp:
47:
24:
error: use
of undeclared identifier
'FALSE'
return FALSE;
^
../../third_party/externals/icu/source/common/appendable.cpp:
51:
12:
error: use
of undeclared identifier
'TRUE'
return TRUE;
^
../../third_party/externals/icu/source/common/appendable.cpp:
56:
12:
error: use
of undeclared identifier
'TRUE'
return TRUE;
^
이렇게 에러가 났는데 소스코드를 보니,
UBool
Appendable
::appendString
(const UChar
*s
, int32_t
length) {
if(length<0) {
UChar
c;
while((c=*s
++)!=0) {
if(!appendCodeUnit
(c)) {
return FALSE;
}
}
} else if(length>0) {
const UChar
*limit
=s
+length;
do
{
if(!appendCodeUnit
(*s
++)) {
return FALSE;
}
} while(s
<limit
);
}
return TRUE;
}소스코드에는 이렇게 되어 있지.
UBool 이 뭔지 알아야 됨.
매뉴얼보면
https://unicode-org.github.io/icu/userguide/dev/codingguidelines.html
Coding GuidelinesICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. The ICU User Guide provides documentation on how to use ICU.unicode-org.github.io
친절하게 잘 나옴
The language built-in type bool and constants true and false may be used internally, for local variables and parameters of internal functions. The ICU type UBool must be used in public APIs and in the definition of any persistent data structures. UBool is guaranteed to be one byte in size and signed; bool is not. Except: Starting with ICU 70 (2021q4), operator==() and operator!=() must return bool, not UBool, because of a change in C++20, see ICU-20973.
TRUE, FALSE 및 operator 부분에서 에러 났음.
https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/umachine_8h.html
ICU 73.1: umachine.h File ReferenceICU 73.1: umachine.h File Referenceunicode-org.github.io
여기 보면.
typedef int8_t UBool
이렇게 친절히 나오네.
저거를 bool 타입으로 바꿔도 무방함.
C++ 폭도들 이런 글엔 댓글 안 달더라 ㅎㅎ
인간적으로 gnu는 gcc, g++로 툴을 분리했으면 g++에 있는 c처리기는 이제 그만 놓아줘도 될 거 같은데 왜 붙잡고 가는지 이해가 안됨. 애초에 소스레벨에서 잡탕밥으로 섞일 여지를 스스로 만들어 놓은 자업자득 상황에서 저래 놓고 c/c++은 별개입눼돠아~ ㅇㅈㄹ
c++ 스펙이 대부분의 c 문법을 포함하기 때문에 c++ 스펙에서 c스펙을 버리지 않는 이상 c++ 컴파일러에서 c 코드가 컴파일되야 함. 어쩔 수 없지 뭐.
그러니 c++ 할배가 .cpp 에 c 코드 쓰지 말라케도 노답이지 ㅋㅋㅋ
그러면 c/c++로 불려도 뭐라할게 없네. 자업자득 맞구만
그렇지
그러네