gpt4 book ai didi

c - Glib — 对 glib 中任何内容的 undefined reference ?

转载 作者:太空宇宙 更新时间:2023-11-04 01:04:52 24 4
gpt4 key购买 nike

<分区>

我的 S 程序有问题。我需要用这个命令编译它:

gcc -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lglib-2.0 \
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wall -Wextra -g -std=c99 -lm *.c \
-o generator1_1

我有很多这样的错误信息:

/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:153: undefined reference to `g_hash_table_lookup'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:171: undefined reference to `g_hash_table_insert'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:172: undefined reference to `g_array_append_vals'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:179: undefined reference to `g_array_append_vals'
/tmp/ccVqEbsM.o: In function `main':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:238: undefined reference to `g_hash_table_new_full'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:239: undefined reference to `g_hash_table_new_full'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:263: undefined reference to `g_hash_table_destroy'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/main.c:264: undefined reference to `g_hash_table_destroy'
/tmp/cc2UG2Wy.o: In function `fillVFile':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/reader.c:47: undefined reference to `g_strdup'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/reader.c:51: undefined reference to `g_ptr_array_add'
/tmp/cctOiTOl.o: In function `calculRegles':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:23: undefined reference to `g_hash_table_get_values'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:48: undefined reference to `g_list_length'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:57: undefined reference to `g_list_sort'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:82: undefined reference to `g_hash_table_new'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:85: undefined reference to `g_array_new'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:110: undefined reference to `g_hash_table_lookup'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:116: undefined reference to `g_hash_table_lookup'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:121: undefined reference to `log2'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:125: undefined reference to `g_array_append_vals'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:128: undefined reference to `g_hash_table_insert'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:139: undefined reference to `g_array_sort'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:167: undefined reference to `g_hash_table_lookup'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:176: undefined reference to `g_hash_table_lookup'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:198: undefined reference to `g_hash_table_destroy'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:199: undefined reference to `g_array_free'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/regles.c:205: undefined reference to `g_list_free'
/tmp/cczRKfT8.o: In function `cstSequence1':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence1.c:19: undefined reference to `g_array_new'
/tmp/cczRKfT8.o: In function `dstSequence1':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence1.c:26: undefined reference to `g_array_free'
/tmp/cczRKfT8.o: In function `hashSeq1Fct':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence1.c:97: undefined reference to `g_str_hash'
/tmp/cczRKfT8.o: In function `eqSeq1Fct':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence1.c:113: undefined reference to `g_str_equal'
/tmp/cc7ZNuaW.o: In function `cstSequence2':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence2.c:22: undefined reference to `g_array_new'
/tmp/cc7ZNuaW.o: In function `dstSequence2':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence2.c:29: undefined reference to `g_array_free'
/tmp/cc7ZNuaW.o: In function `hashSeq2Fct':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence2.c:131: undefined reference to `g_str_hash'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence2.c:132: undefined reference to `g_str_hash'
/tmp/cc7ZNuaW.o: In function `eqSeq2Fct':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence2.c:152: undefined reference to `g_str_equal'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/sequence2.c:153: undefined reference to `g_str_equal'
/tmp/ccY2cdEJ.o: In function `foncteurRetireDoublonsSeq1':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:29: undefined reference to `g_array_remove_index'
/tmp/ccY2cdEJ.o: In function `foncteurRetireDoublonsSeq2':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:52: undefined reference to `g_array_remove_index'
/tmp/ccY2cdEJ.o: In function `retireDoublonsLignesSeq1':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:66: undefined reference to `g_hash_table_get_values'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:68: undefined reference to `g_list_foreach'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:70: undefined reference to `g_list_free'
/tmp/ccY2cdEJ.o: In function `retireDoublonsLignesSeq2':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:75: undefined reference to `g_hash_table_get_values'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:77: undefined reference to `g_list_foreach'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/utils.c:79: undefined reference to `g_list_free'
/tmp/cc8GGinx.o: In function `cstVFile':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/vfile.c:15: undefined reference to `g_ptr_array_sized_new'
/tmp/cc8GGinx.o: In function `dstVFile':
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/vfile.c:26: undefined reference to `g_free'
/home/cyrine/Bureau/Seq_GLib2_1_1_Triche/vfile.c:29: undefined reference to `g_ptr_array_free'
collect2: ld returned 1 exit status
make: *** [all] Error 1

我使用 Ubuntu 12.04。有人知道吗?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com