<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Undefined references when using pointer to member functions"
href="http://llvm.org/bugs/show_bug.cgi?id=18074">18074</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Undefined references when using pointer to member functions
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>hhinnant@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rafael.espindola@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>joerg@NetBSD.org, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>$ cat test.cpp
#include <locale>
typedef char (std::moneypunct_byname<char,false>::*mbr)() const;
void g(mbr x);
int main() {
g(&std::moneypunct_byname<char,false>::decimal_point);
}
$ cat test2.cpp
#include <locale>
typedef char (std::moneypunct_byname<char,false>::*mbr)() const;
void g(mbr x) {
}
$ clang++ -o test.so -shared -fPIC test.cpp test2.cpp
Undefined symbols for architecture x86_64:
"std::__1::moneypunct<char, false>::decimal_point() const", referenced from:
_main in test-c3f9f0.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This works with libstdc++.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>