<html><body bgcolor="#FFFFFF"><div>Hi Sheng Wang,</div><div><br></div><div>I don't think so. This looks like it's not finding the correct headers, which isn't a problem in the llvm-gcc code itself. To determine what's going on, use the -v flag to see where it's trying to find the hearders. You may have to specify additional search directories on the command line. Especially if llvm-c++ isn't installed in /usr/bin. <br><br>-bw</div><div><br>On Sep 4, 2009, at 2:51 AM, "Sheng Wang" <<a href="mailto:wansheg@gmail.com">wansheg@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>sorry ! I have re-corrected the title.<br><div><includetail><div> </div><div style="color: rgb(0, 0, 0);"><div style="padding: 2px 0pt; font-size: 12px; font-family: Arial Narrow;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;"><div id="menu_sender"><b>发件人:</b> "Sheng Wang"<<a href="mailto:wansheg@gmail.com">wansheg@gmail.com</a>>;</div><div><b>发送时间:</b> 2009年9月4日(星期五) 下午3:23</div><div><b>收件人:</b> "LLVMdev"<<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>>; </div><div></div><div><b>主题:</b> [LLVMdev] Dose I need to build llvm-gcc front-end from sourceresolve this error?</div></div><div> </div>
/*<br>     mm.cpp<br>*/<br>#include<iostream><br>using namespace std;<br>struct  xx{<br>int x;<br>        int mm()const;<br>        int mm();<br>};<br><br>int xx::mm() const<br>{<br>        return const_cast<xx*>(this)->mm();<br>}<br><br>int xx::mm()<br>{<br>        cout<<"ok"<<endl;<br>        return x;<br>}<br><br>int main()<br>{<br>        xx x;<br>        x.mm();<br>        return 0;<br>}<br><br>/*********************************************************************************************************************/<br><br>[ws@localhost dev]$ llvm-c++ --emit-llvm mm.cpp <br>In file included from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/cstring:52,<br>                 from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/i686-pc-linux-gnu/bits/c++locale.h:47,<br>                 from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/iosfwd:45,<br>                 from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/ios:43,<br>                 from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/ostream:45,<br>                 from /home/ws/software/llvm-gcc4.2-2.5-x86-linux-RHEL4/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/iostream:45,<br>                 from mm.cpp:1:<br>/usr/include/string.h:546: error: ‘__locale_t’ has not been declared<br>/usr/include/string.h:547: error: nonnull argument references non-pointer operand (argument 1, operand 3)<br>/usr/include/string.h:550: error: ‘__locale_t’ has not been declared<br>/usr/include/string.h:551: error: nonnull argument references non-pointer operand (argument 1, operand 4)<br><br>In my system , gcc-3.4.6 is used as default gcc tool;<br><br>thanks.<br><br><br><br><br></div></includetail></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LLVM Developers mailing list</span><br><span><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu"><a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a></a></span><br><span><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a></span><br></div></blockquote></body></html>