Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I'm trying to make https://code.google.com/p/bluez-tools/. Configure seems to have found the headers. I have obexd-client package installed and BlueZ 4.101.

This is my first experiment at compiling a Linux C application.

Why won't it compile?

obexclient_session.c:(.text+0x202): undefined reference to `g_free'
obexclient_session.c:(.text+0x20e): undefined reference to `g_object_unref'
obexclient_session.c:(.text+0x21b): undefined reference to `g_free'
obexclient_session.c:(.text+0x228): undefined reference to `g_object_unref'
obexclient_session.c:(.text+0x239): undefined reference to `g_type_check_class_cast'
share|improve this question

2 Answers 2

You are missing libraries. You need to make sure that:

  1. You have the required libraries bluez and obexd installed on your system.

    $ sudo apt-get install libbluetooth-dev libopenobex1-dev libopenobex1
    

    NOTE: There might be others but those seem to be the obvious ones. You can find additional libraries using the command apt-cache search <string> where <string> can be things like obex or bluez.

  2. They are at the minimum required versions, bluez-4.69 and obexd-0.30.

share|improve this answer

It seems that glib is missing (g_free, g_object_unref, etc are provided by glib)

$ sudo apt-get install libglib2.0-dev on debian like system

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.