[LLVMdev] 回复: Dose I need to build llvm-gcc front-end from source to resolve this error?
Bill Wendling
isanbard at gmail.com
Sat Sep 5 10:57:09 PDT 2009
Hi Sheng Wang,
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.
-bw
On Sep 4, 2009, at 2:51 AM, "Sheng Wang" <wansheg at gmail.com> wrote:
> sorry ! I have re-corrected the title.
>
> ------------------ 原始邮件 ------------------
> 发件人: "Sheng Wang"<wansheg at gmail.com>;
> 发送时间: 2009年9月4日(星期五) 下午3:23
> 收件人: "LLVMdev"<LLVMdev at cs.uiuc.edu>;
> 主题: [LLVMdev] Dose I need to build llvm-gcc front-end from
> sourceresolve this error?
>
> /*
> mm.cpp
> */
> #include<iostream>
> using namespace std;
> struct xx{
> int x;
> int mm()const;
> int mm();
> };
>
> int xx::mm() const
> {
> return const_cast<xx*>(this)->mm();
> }
>
> int xx::mm()
> {
> cout<<"ok"<<endl;
> return x;
> }
>
> int main()
> {
> xx x;
> x.mm();
> return 0;
> }
>
> /
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> *********************************************************************/
>
> [ws at localhost dev]$ llvm-c++ --emit-llvm mm.cpp
> 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,
> 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,
> 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,
> 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,
> 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,
> 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,
> from mm.cpp:1:
> /usr/include/string.h:546: error: ‘__locale_t’ has not been declar
> ed
> /usr/include/string.h:547: error: nonnull argument references non-
> pointer operand (argument 1, operand 3)
> /usr/include/string.h:550: error: ‘__locale_t’ has not been declar
> ed
> /usr/include/string.h:551: error: nonnull argument references non-
> pointer operand (argument 1, operand 4)
>
> In my system , gcc-3.4.6 is used as default gcc tool;
>
> thanks.
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090905/02f1d92d/attachment.html>
More information about the llvm-dev
mailing list