我正在尝试在 vala 中发出 get 请求,如下所示:https ://wiki.gnome.org/Vala/LibSoupSample 。我完全按照它所说的去做,编译器会抛出这个:
Connection.vala.c:(.text+0x76): undefined reference to `soup_session_new'
collect2: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
这是结果pkg-config --libs --cflags libsoup-2.4
-pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lglib-2.0
我有 vala 0.20.1。在elementaryos(最新的稳定版本)上运行。有任何想法吗?