Henrik Bach
2004-Jul-03 18:16 UTC
[LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
On Sat, 3 Jul 2004, Chris wrote:> >That should work fine. I'm not familiar at all with internix, but it >appears to have a buggy header or something. From what I understand, >internix is a posix layer for windows. Have you tried compiling under >cygwin?No, not yet.>If you grab the latest CVS sources, they should work fine with >cygwin, and will probably work better with windows in general than LLVM >1.2.>Again, I'm sorry that I don't know more about this and why <cstring> >apparently doesn't have strdup, it seems really odd. If <cstring> doesn't >work, you could try <string.h> explicitly, but it would be much better to >use cygwin if you can.As far as I've investigated, it seems more clear to me, that it is the SDK of Interix that is buggy, because, if I includes free from <stdlib.h> and references it in a small test program, the compiler doesn't complain. The same doesn't apply for strdup included from <string.h>, even though it seems to be in the standard include path for GCC (/usr/include). I'll give LLVM version 1.2 a try before moving on with the latest CVS sources. Is the patch you send to me still valid though? /Henrik _________________________________________________________________ F� alle de nye og sjove ikoner med MSN Messenger http://www.msn.dk/messenger
Misha Brukman
2004-Jul-03 19:34 UTC
[LLVMdev] CommandLine.cpp:189: error: `strdup' undeclared
On Sun, Jul 04, 2004 at 01:14:42AM +0200, Henrik Bach wrote:> Is the patch you send to me still valid though?Well, the patch adds #include <cstring> to CommandLine.cpp, so you should try the patch first. If it does not work, then the Interix SDK <cstring> is not a fully complete substitue for <string.h>, which it should be, then you may have to manually try changing the <cstring> to <string.h> and go from there. If that is the case, you may encounter other problems elsewhere in the source code that may also require <string.h> in place of <cstring> ... Hope that helps. -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
Reasonably Related 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