You are not logged in.
Pages: 1
Hi,
i'm trying to compile following code:
#include <linux/ext2_fs.h>
int main()
{
return 0;
}
and i'm getting following errors:
In file included from test.cpp:1:
/usr/include/linux/ext2_fs.h: In function '__u32 ext2_mask_flags(umode_t, __u32)':
/usr/include/linux/ext2_fs.h:179: error: 'S_ISDIR' was not declared in this scope
/usr/include/linux/ext2_fs.h:181: error: 'S_ISREG' was not declared in this scope
/usr/include/linux/ext2_fs.h:182: error: 'FS_DIRSYNC_FL' was not declared in this scope
/usr/include/linux/ext2_fs.h:182: error: 'FS_TOPDIR_FL' was not declared in this scope
/usr/include/linux/ext2_fs.h:184: error: 'FS_NODUMP_FL' was not declared in this scope
/usr/include/linux/ext2_fs.h:184: error: 'FS_NOATIME_FL' was not declared in this scope
I tried compile it on Ubuntu and everything works fine.
Last edited by pejotr (2010-01-07 12:43:56)
Offline
// test.c
// compile with gcc test.c
#include <linux/fs.h>
#include <linux/ext2_fs.h>
int main()
{
return 0;
}
This compiles for me. You can normally fix those sort of errors by grepping around /usr/include for the missing include files. This doesn't work if you try to compile it as C++ though.
Offline
Pages: 1