I had the following header to a file:
WebKit/Source/web/WebViewImpl.h
and I get the following error:
I think what is in bold is the problem. Would it be possible to define U-NAMESPACE_USE with a different namespace other than U_ICU_NAMESPACE
third_party/icu/source/common/unicode/uversion.h:128:8: error: using namespace directive in global context in header [-Werror,-Wheader-hygiene]
U_NAMESPACE_USE
^
../../third_party/icu/source/common/unicode/uversion.h:121:44: note: expanded from macro 'U_NAMESPACE_USE' # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
^
../../third_party/icu/source/common/unicode/uversion.h:114:32: note: expanded from macro 'U_ICU_NAMESPACE'
# define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
^
../../third_party/icu/source/common/unicode/uvernum.h:113:40: note: expanded from macro 'U_ICU_ENTRY_POINT_RENAME'
#define U_ICU_ENTRY_POINT_RENAME(x) U_DEF2_ICU_ENTRY_POINT_RENAME(x,U_ICU_VERSION_SUFFIX)
^
../../third_party/icu/source/common/unicode/uvernum.h:112:44: note: expanded from macro 'U_DEF2_ICU_ENTRY_POINT_RENAME'
#define U_DEF2_ICU_ENTRY_POINT_RENAME(x,y) U_DEF_ICU_ENTRY_POINT_RENAME(x,y)
^
../../third_party/icu/source/common/unicode/uvernum.h:111:43: note: expanded from macro 'U_DEF_ICU_ENTRY_POINT_RENAME'
#define U_DEF_ICU_ENTRY_POINT_RENAME(x,y) x ## y
^
<scratch space>:14:1: note: expanded from here
icu_58
^
1 error generated.
ninja: build stopped: subcommand failed.
chromium documentation states the following:
If you get the error:
- using namespace directive in global context in header [-Wheader-hygiene]
It's because you did something like this in a header:
using namespace WebKit;
class OurDerivedClass : public WebKitType {
};
You can fix this by removing the "using namespace" line and explicitly stating the namespace:
class OurDerivedClass : public WebKit::WebKitType {
};
Is there a way to apply the above to my situation?
Any ideas I am willing to try. Is it possible to try renaming the namespace?
thanks