firebase / firebase-cpp-sdk

Firebase C++ SDK
http://firebase.google.com
Apache License 2.0
271 stars 110 forks source link

[FR] 0>app.h(341,5): Error : 'INTERNAL_EXPERIMENTAL' is not defined, evaluates to 0 [-Werror,-Wundef] #1601

Open nguyenvanminhc9nvm opened 1 month ago

nguyenvanminhc9nvm commented 1 month ago

i receiver this error when try build sdk from rider for project ue5, how can i fix it

0>app.h(320,5): Error : 'INTERNAL_EXPERIMENTAL' is not defined, evaluates to 0 [-Werror,-Wundef] 0>#if INTERNAL_EXPERIMENTAL 0> ^ 0>app.h(341,5): Error : 'INTERNAL_EXPERIMENTAL' is not defined, evaluates to 0 [-Werror,-Wundef] 0>#if INTERNAL_EXPERIMENTAL 0> ^ 0>app.h(353,5): Error : 'INTERNAL_EXPERIMENTAL' is not defined, evaluates to 0 [-Werror,-Wundef] 0>#if INTERNAL_EXPERIMENTAL 0> ^ 0>app.h(382,5): Error : 'INTERNAL_EXPERIMENTAL' is not defined, evaluates to 0 [-Werror,-Wundef] 0>#if INTERNAL_EXPERIMENTAL 0> ^

google-oss-bot commented 1 month ago

I found a few problems with this issue:

jonsimantov commented 1 month ago

As a workaround, if you can add a preprocessor definition INTERNAL_EXPERIMENTAL=0, that should fix this.

paulpv commented 6 days ago

Those are all lines with

#if INTERNAL_EXPERIMENTAL

All prior uses of INTERNAL_EXPERIMENTAL in that file were:

#ifdef INTERNAL_EXPERIMENTAL

Either:

  1. a default value needs to be defined and all of the #ifdef replaced with #if -or-
  2. all of the #if INTERNAL_EXPERIMENTAL need to be replaced with #if defined(INTERNAL_EXPERIMENTAL) && INTERNAL_EXPERIMENTAL