Sheng Wang
2009-Sep-04 07:23 UTC
[LLVMdev] Dose I need to build llvm-gcc front-end from source resolve 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 declared /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 declared /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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090904/84a353e1/attachment.html>
Reasonably Related Threads
- [LLVMdev] 回复:[LLVMdev] Dose I need to build llvm-gcc front-end from source to resolve this error?
- [LLVMdev] build the llvm-gcc from source, error occur.
- [LLVMdev] Building front end under OS X
- [LLVMdev] Building front end under OS X
- [LLVMdev] cannot find -lgcc_s