[Prev][Next][Index][Thread]
Linux filesystems...
When I try to compile the following code:
---------------------------------------------------------------------------------
#include <stdio.h>
#include <oskit/fs/dir.h>
#include <oskit/fs/linux.h>
#include <oskit/io/blkio.h>
#define DISK_PART "hdas2"
main()
{
oskit_blkio_t *bio = DISK_PART;
oskit_filesystem_t **out_fs;
if((fs_linux_init())!=NULL) {
printf("Error initializing the linux filesystem module!");
}
if ((fs_linux_mount(bio, OSKIT_FS_NOEXEC, out_fs))!=NULL) {
printf("Error mounting the partition!");
}
}
----------------------------------------------------------------------------------
I get the following error message from the compiler:
[root@localhost x86]# make
gcc -c -o linux_fs_com.o -DOSKIT -MD -DHAVE_CONFIG_H -I.
-I../../examples/x86 -I../../examples/x86/more
-I../../examples/x86/shared -I- -I../../oskit/c
-I../../examples/x86/shared -I../.. -I../.. -nostdinc -O2 -Wall
linux_fs_com.c
linux_fs_com.c:14: warning: return-type defaults to `int'
linux_fs_com.c: In function `main':
linux_fs_com.c:15: warning: initialization from incompatible pointer
type
linux_fs_com.c:16: warning: initialization from incompatible pointer
type
linux_fs_com.c:26: warning: control reaches end of non-void function
ld -Ttext 100000 -L../../lib \
-o linux_fs_com ../../lib/multiboot.o linux_fs_com.o
\
-loskit_linux_fs -loskit_fs -loskit_linux_dev -loskit_dev \
-loskit_diskpart -loskit_kern -loskit_memdebug -loskit_c
-loskit_lmm \
../../lib/crtn.o
../../lib/liboskit_linux_fs.a(current.o): In function
`fs_linux_create_current':current.o(.text+0x24): undefined reference to
`oskit_get_call_context'
make: *** [linux_fs_com] Error 1
[root@localhost x86]#
Now, perhaps the code is full of errors... it's my second day with this
lib! so, if anyone can help me to compile this...
Thanks for all!!!!
Facundo
pd: it's not the same linux_fs_com.c of the "examples" directory, I just
used it to compile it directly with the makefile of the examples.
Follow-Ups: