1

我正在尝试使用带有 imlib2 的 Cygwin 在 Windows上构建pwntcha 。在“制作”步骤中,我收到错误消息:/home/username/pwntcha/src/image.c:37: undefined reference to imlib_load_image。谁能帮我解决它?

更详细的:

gcc `imlib2-config --cflags` -DX_DISPLAY_MISSING=1 -Wall -O6 -g -O2 `imlib2-config --libs`   -o pwntcha.exe pwntcha-main.o pwntcha-filter.o  pwntcha-font.o pwntcha-image.o  pwntcha-easter-eggs.o pwntcha-test.o authimage/libdecoder.a clubic/libdecoder.a java/libdecoder.a linuxfr/libdecoder.a livejournal/libdecoder.a lmt/libdecoder.a paypal/libdecoder.a phpbb/libdecoder.a scode/libdecoder.a slashdot/libdecoder.a ticketmaster/libdecoder.a tickets/libdecoder.a vbulletin/libdecoder.a xanga/libdecoder.a
pwntcha-image.o: In function `image_load':
/home/username/pwntcha/src/image.c:37: undefined reference to "imlib_load_image"
/home/username/pwntcha/src/image.c:63: undefined reference to "imlib_context_set_image"
/home/username/pwntcha/src/image.c:64: undefined reference to "imlib_image_get_width"
/home/username/pwntcha/src/image.c:65: undefined reference to "imlib_image_get_height"
    /home/username/pwntcha/src/image.c:66: undefined reference to "imlib_image_get_width"

/home/username/pwntcha/src/image.c:68:未定义对“imlib_image_get_data”的引用

预先感谢。

4

1 回答 1

2

gcc按列出的顺序解析符号。您需要修补构建系统以移动`imlib2-config --libs`到链接命令的最后。

于 2013-07-03T04:34:46.550 回答