Problème mqueue.h
Vincent
-
jfk -
jfk -
Bonjour,
je tente de réaliser une communication par l'intermédiaire de message queue. Pour cela j'utilise les API POSIX mq_open, mq_receive...
A la compilation avec gcc j'obtient l'erreur suivante :
/tmp/cccKrp7J.o(.text+0x48): In function `main':
: undefined reference to `mq_open'
J'utilise la fonction comme cela :
const char *ApplAF = "/ApplAF";
mqd_t Des_Queue = 0;
Des_Queue = mq_open(ApplAF, O_RDWR);
J'ai aucune idée d'ou ca vient, j'ai pu lire sur internet que l'erreur proviendrai de la bibliothéque mqueue.h mais elle se trouve à l'endroit attendu.
Si quelqu'un a une idée....
Merci d'avance
je tente de réaliser une communication par l'intermédiaire de message queue. Pour cela j'utilise les API POSIX mq_open, mq_receive...
A la compilation avec gcc j'obtient l'erreur suivante :
/tmp/cccKrp7J.o(.text+0x48): In function `main':
: undefined reference to `mq_open'
J'utilise la fonction comme cela :
const char *ApplAF = "/ApplAF";
mqd_t Des_Queue = 0;
Des_Queue = mq_open(ApplAF, O_RDWR);
J'ai aucune idée d'ou ca vient, j'ai pu lire sur internet que l'erreur proviendrai de la bibliothéque mqueue.h mais elle se trouve à l'endroit attendu.
Si quelqu'un a une idée....
Merci d'avance
4 réponses
essayer avec gcc -E pour voir s il inclut le fichier
Alors la il arrive a compiler mais alors au lancement il me fait de la grosse merde, genre ca :
./com: line 22: typedef: command not found
./com: line 35: typedef: command not found
./com: line 36: typedef: command not found
./com: line 37: typedef: command not found
./com: line 38: typedef: command not found
./com: line 41: typedef: command not found
./com: line 42: typedef: command not found
./com: line 43: typedef: command not found
./com: line 44: typedef: command not found
./com: line 45: typedef: command not found
./com: line 46: typedef: command not found
./com: line 51: __extension__: command not found
./com: line 52: __extension__: command not found
./com: line 60: __extension__: command not found
./com: line 61: __extension__: command not found
./com: line 71: __extension__: command not found
./com: line 72: __extension__: command not found
./com: line 73: __extension__: command not found
./com: line 74: __extension__: command not found
./com: line 75: __extension__: command not found
./com: line 76: __extension__: command not found
./com: line 77: __extension__: command not found
./com: line 78: __extension__: command not found
./com: line 79: __extension__: command not found
./com: line 80: __extension__: command not found
./com: line 81: syntax error near unexpected token `}'
./com: line 81: `__extension__ typedef struct { int __val[2]; } __fsid_t;'
J'sais pas si ca t'inspire quelque chose ...
./com: line 22: typedef: command not found
./com: line 35: typedef: command not found
./com: line 36: typedef: command not found
./com: line 37: typedef: command not found
./com: line 38: typedef: command not found
./com: line 41: typedef: command not found
./com: line 42: typedef: command not found
./com: line 43: typedef: command not found
./com: line 44: typedef: command not found
./com: line 45: typedef: command not found
./com: line 46: typedef: command not found
./com: line 51: __extension__: command not found
./com: line 52: __extension__: command not found
./com: line 60: __extension__: command not found
./com: line 61: __extension__: command not found
./com: line 71: __extension__: command not found
./com: line 72: __extension__: command not found
./com: line 73: __extension__: command not found
./com: line 74: __extension__: command not found
./com: line 75: __extension__: command not found
./com: line 76: __extension__: command not found
./com: line 77: __extension__: command not found
./com: line 78: __extension__: command not found
./com: line 79: __extension__: command not found
./com: line 80: __extension__: command not found
./com: line 81: syntax error near unexpected token `}'
./com: line 81: `__extension__ typedef struct { int __val[2]; } __fsid_t;'
J'sais pas si ca t'inspire quelque chose ...
En fait j'ai fait le include en début du programme, en fait c'est comme si il me trouvait pas la bibliothéque alors qu'elle est dans le répertoire avec toutes les autres :(