bonjour je dois insérer #include <glib.h> dans mon projet cependant quand je compile avec mon make cela produit des erreurs de compilation.


voici mon make :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
CC = gcc
LFLAGS = -g -W -Wall -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wbad-function-cast -Wcast-qual -o `pkg-config --libs glib-2.0`
CFLAGS = -c -g -W -Wall -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wbad-function-cast -Wcast-qual -Werror `pkg-config --cflags glib-2.0`
EXEC = serveur
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)
 
all : $(EXEC)
 
$(EXEC) : $(OBJ)
	@ $(CC) $(LFLAGS) $@ $^ $(LDFLAGS)
%.o : %.c
	@ $(CC) $(CFLAGS) $< -o $*.o
 
clean:
	@ rm -f $(OBJ) $(EXEC) *~
 
mrproper: clean
	@ rm -f $(EXEC)
Voici mes erreurs de compilations:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
cc1: warnings being treated as errors
In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34,
                 from /usr/include/glib-2.0/glib.h:34,
                 from base.h:22,
                 from connexion.c:12:
/usr/include/glib-2.0/glib/gthread.h: In function ‘g_once_init_enter’:
/usr/include/glib-2.0/glib/gthread.h:348: error: cast discards qualifiers from pointer target type
make: *** [connexion.o] Erreur 1
je ne trouve pas mon erreur, pouvez vous m'aider sur ce point?

Merci de votre compréhension.