PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : libs für inotify



zorin
13-08-2006, 19:24
Hallo zusammen,

ich möchte ein Testprogramm mit inotify schreiben. weiss jemand, welche Bibliothek ich dem gcc zum linken mitgeben muss?

#include <stdio.h>
#include <stdlib.h>
#include <linux/inotify.h>

gcc -o main main.c -l??

Danke Euch schonmal
Gruss Zorin

jeebee
13-08-2006, 20:01
möglicherweise
-lnotify Da findet ld jedenfalls eine Lib.

zorin
13-08-2006, 21:31
Erstmal Danke für die schnelle Antwort.

Es hat ein link von /usr/lib/libnotify.so auf /usr/lib/libnotify.so.1 gefehlt. Aber die Fehlermeldung bleibt:


:~$ gcc -o main main.c -lnotify
/tmp/ccLur7Wg.o: In function `main':
main.c:(.text+0x1e): undefined reference to `inotify_init'
main.c:(.text+0x38): undefined reference to `inotify_add_watch'


Jemand ne Idee? :(

Gruss Zorin

panzi
14-08-2006, 18:27
Gibt's kein man inotify? Oder man notify, man inotify.h, man linux/inotify.h oder ähnliches? Sowas sollte doch so wo stehn, mein ich.

Joghurt
14-08-2006, 20:16
Hast du auch das inotify dev bzw. devel Paket installiert?

kickzha
29-09-2006, 19:52
...erstmal ein Hallo ins Board!! (mein erstes Posting hier)

Ich habe das selbe Problem.
Loesung steht ja hier noch keine, darum moechte ich mich hier einfach mal Einreihen.


libnotify != inotify

libnotify-bin - sends desktop notifications to a notification daemon
libnotify-dev - sends desktop notifications to a notification daemon
libnotify1 - sends desktop notifications to a notification daemon
notification-daemon - a daemon that displays passive pop-up notifications

...inotify ist da schon was anderes. Mehr weiss ich aber auch noch nicht.

locus vivendi
04-10-2006, 12:18
Dieses C++ Interface für Inotify habe ich vor kurzem auf Freshmeat.net gesehn, vielleicht interessiert es ja jemanden:
http://inotify-cxx.aiken.cz/

Der Untergeher
05-10-2006, 16:47
Dann häng ich mich auch nochmal ran:
Wenn das C Interface reicht benötigt man keine Libs - inotify ist Bestandteil des Kernels. Ein einfaches Programm, dass dieses Interface benutzt gibt's hier (http://freshmeat.net/projects/inotify-tools/). Eine ziemlich gut verständliche Einführung in inotify hab ich hier (http://www.linuxjournal.com/article/8478) gefunden.