【发布时间】:2014-04-11 23:07:26
【问题描述】:
当我想编译我的 C 程序时,我遇到了问题。它适用于 Ubuntu 11.04,但是当我迁移到 Ubuntu 13 时,我遇到了这个问题。
我用这个 Makefile 编译:
all:
gcc -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \
-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 concatener
我收到以下错误:
undefined reference to « g_str_equal »
undefined reference to « g_str_equal »
undefined reference to « g_array_remove_index »
undefined reference to « g_array_remove_index »
为什么它不能识别这些功能?我是否链接到 glib 库错误?
【问题讨论】: