Re: Building examples fails



Hi

On 28 Nov 2013 21:04, "Nils Caspar" <ncaspar me com> wrote:
>
> I'm trying to build the example file `examples/C/glib/list-connections-libnm-glib.c` with the command given in the comment:
>
> ```
>  * Compile with:
>  *   gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-util libnm-glib` list-connections-libnm-glib.c -o list-connections-libnm-glib
> ```
>
> This fails on my Ubuntu 12.04 machine with the following error:
>
> ```
> list-connections-libnm-glib.c: In function ‘main’:
> list-connections-libnm-glib.c:157:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
> /tmp/ccMqB242.o: In function `signal_handler':
> list-connections-libnm-glib.c:(.text+0x31): undefined reference to `g_log'
> list-connections-libnm-glib.c:(.text+0x40): undefined reference to `g_main_loop_quit'
> /tmp/ccMqB242.o: In function `show_connection':
> list-connections-libnm-glib.c:(.text+0x1a0): undefined reference to `nm_connection_get_setting_connection'
> list-connections-libnm-glib.c:(.text+0x1c4): undefined reference to `nm_setting_connection_get_timestamp'
> list-connections-libnm-glib.c:(.text+0x1e4): undefined reference to `g_strdup_printf'
> list-connections-libnm-glib.c:(.text+0x222): undefined reference to `nm_setting_connection_get_id'
> list-connections-libnm-glib.c:(.text+0x235): undefined reference to `nm_setting_connection_get_uuid'
> list-connections-libnm-glib.c:(.text+0x248): undefined reference to `nm_setting_connection_get_connection_type'
> list-connections-libnm-glib.c:(.text+0x25b): undefined reference to `nm_connection_get_path'
> list-connections-libnm-glib.c:(.text+0x2b2): undefined reference to `g_free'
> /tmp/ccMqB242.o: In function `get_connections_cb':
> list-connections-libnm-glib.c:(.text+0x2e4): undefined reference to `nm_remote_settings_list_connections'
> list-connections-libnm-glib.c:(.text+0x308): undefined reference to `g_slist_foreach'
> list-connections-libnm-glib.c:(.text+0x314): undefined reference to `g_slist_free'
> list-connections-libnm-glib.c:(.text+0x320): undefined reference to `g_object_unref'
> list-connections-libnm-glib.c:(.text+0x32f): undefined reference to `g_main_loop_quit'
> /tmp/ccMqB242.o: In function `list_connections':
> list-connections-libnm-glib.c:(.text+0x351): undefined reference to `nm_remote_settings_new'
> list-connections-libnm-glib.c:(.text+0x375): undefined reference to `g_log'
> list-connections-libnm-glib.c:(.text+0x38e): undefined reference to `g_main_loop_quit'
> list-connections-libnm-glib.c:(.text+0x3b7): undefined reference to `g_object_get'
> list-connections-libnm-glib.c:(.text+0x3d7): undefined reference to `g_log'
> list-connections-libnm-glib.c:(.text+0x3f0): undefined reference to `g_main_loop_quit'
> list-connections-libnm-glib.c:(.text+0x41e): undefined reference to `g_signal_connect_data'
> /tmp/ccMqB242.o: In function `main':
> list-connections-libnm-glib.c:(.text+0x439): undefined reference to `g_type_init'
> list-connections-libnm-glib.c:(.text+0x448): undefined reference to `dbus_g_bus_get'
> list-connections-libnm-glib.c:(.text+0x45d): undefined reference to `g_idle_add'
> list-connections-libnm-glib.c:(.text+0x46c): undefined reference to `g_main_loop_new'
> list-connections-libnm-glib.c:(.text+0x487): undefined reference to `g_main_loop_run'
> list-connections-libnm-glib.c:(.text+0x496): undefined reference to `g_main_loop_unref'
> list-connections-libnm-glib.c:(.text+0x4a2): undefined reference to `dbus_g_connection_unref'
> collect2: error: ld returned 1 exit status
> ```
>
> Am I missing something? Is the build command still up-to-date?
>
> Cheers,
> Nils
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> https://mail.gnome.org/mailman/listinfo/networkmanager-list

Are the nm dev pkgs installed on system ? Works fine on my system.

   $ sudo apt-get build-dep network-manager

Cheers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]