<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im"> Without the extern "C", the variable "point_string" is subject to C++ name<br> mangling: on win32 it becomes "?point_string@@3PADA", leaving an unresolved<br> symbol "_point_string".<br>
<br></div>Well, this is a C++ file, point_string is supposed to be a C++ variable,<br>so if your compiler mangles its use but not its declaration, it sounds<br>like a serious compiler problem.</blockquote>
<div> </div>
<div>tests/cxx/clocale.c is a pure C file, declaring "extern char point_string[];"</div>
<div>tests/cxx/t-locale.cc is a C++ file, defining "char point_string[2];".</div>
<div> </div>
<div>Either the C++ file needs to have its definition of point_string wrapped in extern "C", or at least it should see an "extern" declaration of point_string wrapped in extern "C" first, which is not the case.</div>
<div>In the current code, the declared point_string in clocale.c and the defined point_string in t-locale.cc are not guaranteed to map to the same name for the linker. It happens to work with gcc because this compiler doesn't mangle global c++ variables (which is fine by itself, but not required).</div>
<div> </div>
<div>Kind regards,</div>
<div> </div>
<div>Michiel</div></div>