BlogKontaktTagcloud

Compiling fuse example

Some days ago I tried to install fuse and compile the demonstration "Hello World" filesystem. But it was not as easy as I thougth (but hey, since when is compiling in C an easy thing).

First of all I had to install the right packages in my Debian based Kubuntu. I needed to install the fuse-source, fuse-utils, libfuse-dev and libfuse2 packages. When I tried to compile the first time I got a lot of trouble with the compilerflags. First thing, the file offset has to be 64 bits, which is easy to figure because the compiler informs you about this circumstance very
clearly. But finding the flag for the message "hello.c:93: Fehler: unbekanntes Feld »readdir« in Initialisierung angegeben" or in english "hello.c:86: error: unknown field 'readdir' specified in initializer" needed some googling, after some time I found the recent flag in the fuse
mailinglist
. So the correct call to the compiler is:

gcc -lfuse -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=22 hello.c -o hello

After that, everything works well and you can use the "Hello World"-Filesystem like it's described on the Fuse-Page. As usual (with C-problems) many thanks to Mirko for support.
Ähnliche Beiträge:
PHP Quine
I'm in ur powerlinez
100@facebook
New email tactic
Nacked access point
Comments (0)  Permalink