<div dir="ltr">Hi All,<div><br></div><div>I just added a declaration in WTF/wtf/DataLog.h, like what we commonly do in C:</div><div><br></div><div>================</div><div>namespace WTF{</div><div>...</div><div>WTF_EXPORT_PRIVATE extern int abc;<br>
</div><div>...<br></div><div>}</div><div>using WTF::abc;<br></div><div>================<br></div><div><br></div><div>Of course, DataLog.cpp has the actual declaration.</div><div><br></div><div>However, when compiling with Clang, it emits an error : &quot;declaration requires a global constructor&quot;. I am quite confused about the error message. How can I write a constructor for abc?</div>
<div><br></div><div>I just want the variable abc to be visible as &quot;dataLog&quot; does. Thanks.</div><div><br></div><div>Best</div><div>Wei</div><div><br></div><div><br></div></div>