Henrik Bach
2004-Jul-02 20:18 UTC
[LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
Hi Guys I'm trying to port and build LLVM to the Interix environment. I've succeded until the Interix version of gcc program executes: gmake[1]: Entering directory `/usr/local/src/llvm/lib/Support' gmake[1]: Leaving directory `/usr/local/src/llvm/lib/Support' gmake[1]: Entering directory `/usr/local/src/llvm/lib/Support' Compiling CommandLine.cpp CommandLine.cpp: In function `void ParseCStringVector(std::vector<char*, std::allocator<char*> >&, const char*)': CommandLine.cpp:189: error: `strdup' undeclared (first use this function) CommandLine.cpp:189: error: (Each undeclared identifier is reported only once for each function it appears in.) CommandLine.cpp: In function `void llvm::cl::ParseEnvironmentOptions(const char*, const char*, const char*)': CommandLine.cpp:230: error: `strdup' undeclared (first use this function) gmake[1]: *** [/usr/local/src/llvm/lib/Support/Debug/CommandLine.lo] Error 1 gmake[1]: Leaving directory `/usr/local/src/llvm/lib/Support' gmake: *** [all] Error 1 It seems that the declaration of strdup is missing. However, in the ../include/Support/CommandLine.h you've included a reference to the <string> library. The man page of Interix suggests a reference to <string.h> instead. The version of gcc is: %gcc --version gcc (GCC) 3.3 Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. % I can't figure out what's wrong here. /Henrik _________________________________________________________________ F� alle de nye og sjove ikoner med MSN Messenger http://www.msn.dk/messenger
Chris Lattner
2004-Jul-02 20:25 UTC
[LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
On Fri, 2 Jul 2004, Henrik Bach wrote:> I'm trying to port and build LLVM to the Interix environment. I've succeded > until the Interix version of gcc program executes: > I can't figure out what's wrong here.Try this patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040628/015669.html Sorry for the delay, the mailing lists got blocked up today. -Chris -- http://llvm.cs.uiuc.edu/ http://www.nondot.org/~sabre/Projects/
Maybe Matching Threads
- [LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
- [LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
- [LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
- [LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
- [LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared