Bonjour,
Je ne suis pas sûr que ce soit la bonne façon de poser ma question .. J'ai juste essayé de résoudre le problème pendant 4 jours, et je suis extrêmement frustré en ce moment ... J'ai le problème suivant:
J'ai installé Ubuntu 13. et certaines bibliothèques et paquets par la suite. J'ai ensuite installé glib2 Tout s'est bien passé, je suis pas d'erreurs lorsque vous faites. / Configure, make, make install ou. Cependant, quand j'essaye de compiler un fichier de test en C, je peux compiler sans erreurs, mais je reçois les erreurs suivantes:
Je compile avec
main.c:116: référence indéfinie vers « g_hash_table_new_full »
main.c:139: référence indéfinie vers « g_hash_table_lookup »
main.c:168: référence indéfinie vers « g_hash_table_insert »
main.c:181: référence indéfinie vers « g_hash_table_lookup »
main.c:211: référence indéfinie vers « g_hash_table_insert »
main.c:250: référence indéfinie vers « g_hash_table_lookup »
gcc -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/include/glib-2.0/glib.h -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -lglib-2.0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -g -Wall -Wextra -std=c99 -lm *.c -o formattage
I am not sure if this is the correct way of asking my question.. I just tried to solve the problem for 4 days, and I am extremely frustrated right now... I have the following issue:
I installed Ubuntu 13. and some libraries and packages afterwards. I then installed glib2 Everything went fine, I got no errors when doing ./configure, make, or make install. However, when I try to compile a test file in C, I can compile without errors, but I get the following errors:
main.c:116: référence indéfinie vers « g_hash_table_new_full »
main.c:139: référence indéfinie vers « g_hash_table_lookup »
main.c:168: référence indéfinie vers « g_hash_table_insert »
main.c:181: référence indéfinie vers « g_hash_table_lookup »
main.c:211: référence indéfinie vers « g_hash_table_insert »
main.c:250: référence indéfinie vers « g_hash_table_lookup »
I compile with:
gcc -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/include/glib-2.0/glib.h -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/ -lglib-2.0 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -g -Wall -Wextra -std=c99 -lm *.c -o formattage
donne:pkg-config --cflags --libs glib-2.0
Une idée svp?-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lglib-2.0
Merci
Partager