Henrik Bach
2004-Sep-18 16:46 UTC
[LLVMdev] MAXPATHLEN' undeclared (first use this function)
Hi, I get below error: --------------------------------- In file included from /usr/local/build/llvm/lib/System/platform/Path.cpp:23, from /usr/local/src/llvm/lib/System/Path.cpp:27: /usr/local/build/llvm/lib/System/platform/../Unix/Path.cpp: In member function `bool llvm::sys::Path::create_directory(bool)': /usr/local/build/llvm/lib/System/platform/../Unix/Path.cpp:343: error: ` MAXPATHLEN' undeclared (first use this function) --------------------------------- MAXPATHLEN is on Interix defined in <limits.h>. However, it doesn't seem to have any effect including it before any other header files in the system specific Path.cpp for Interix as seen above: --------------------------------- #include <limits.h> // Include the generic Unix implementation #include "../Unix/Path.cpp" ... --------------------------------- Any suggestions? Henrik _________________________________________________________________ Opret en gratis Hotmail-konto http://www.hotmail.com med udsigt til 250 MB lagerkapacitet
Reid Spencer
2004-Sep-18 16:53 UTC
[LLVMdev] MAXPATHLEN' undeclared (first use this function)
A few things. 1. There's probably a #define that controls the definition of MAXPATHLEN. You'd need to set that before you #include limits.h. I don't know what the #define is, but this is a very common thing in these kinds of headers. 2. There might just be an alias for MAXPATHLEN such as PATHLEN or MAXPATH that is always defined. Have a look at limits.h 3. Since Interix is like POSIX, you might want to you _POSIX_PATH_MAX instead. Reid. On Sat, 2004-09-18 at 09:46, Henrik Bach wrote:> Hi, > > I get below error: > --------------------------------- > In file included from /usr/local/build/llvm/lib/System/platform/Path.cpp:23, > from /usr/local/src/llvm/lib/System/Path.cpp:27: > /usr/local/build/llvm/lib/System/platform/../Unix/Path.cpp: In member > function > `bool llvm::sys::Path::create_directory(bool)': > /usr/local/build/llvm/lib/System/platform/../Unix/Path.cpp:343: error: ` > MAXPATHLEN' undeclared (first use this function) > --------------------------------- > > MAXPATHLEN is on Interix defined in <limits.h>. > > However, it doesn't seem to have any effect including it before any other > header files in the system specific Path.cpp for Interix as seen above: > --------------------------------- > #include <limits.h> > > // Include the generic Unix implementation > #include "../Unix/Path.cpp" > > ... > --------------------------------- > > Any suggestions? > > Henrik > > _________________________________________________________________ > Opret en gratis Hotmail-konto http://www.hotmail.com med udsigt til 250 MB > lagerkapacitet > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040918/724b6b67/attachment.sig>
Seemingly Similar Threads
- [LLVMdev] ToolRunner.cpp:396: error: `SHLIBEXT' undeclared (first use this function)
- [LLVMdev] ToolRunner.cpp:396: error: `SHLIBEXT' undeclared (firstuse this function)
- [LLVMdev] Type uint64_t required but not found
- [LLVMdev] ToolRunner.cpp:396: error: `SHLIBEXT' undeclared (firstuse this function)
- [LLVMdev] lib/System Unleashed - Need Your Help!