LimeSuite Undefined Reference

Hi all,

I have attempted a few times to install LimeSuite on Ubuntu 22.04, both from source and via ppa. Each time I have attempted, I am able to use all of the LimeUtil CLI capabilities, including LimeGUI.

I have also done the same for the new LimeSuite NG and was again able to use the CLI capabilities.

However, each time I attempt to build a C or C++ program, I get an undefined reference error to any LimeSuite function (such as LMS_GetDeviceList). I have verified that lime/LimeSuite.h is in the directory path for my gcc and g++ compilers.

I apologize for any lack of specificity, but has anyone had an issue importing the LimeSuite API in C or C++?

The exact error I am seeing:

usr/bin/ld: /tmp/ccV3eeAC.o: in function main': hello_lime.c:(.text+0x29): undefined reference to LMS_GetDeviceList’
collect2: error: ld returned 1 exit status

and my code:

#include <stdio.h>
#include "lime/LimeSuite.h"

int main(){
    int n;
    lms_info_str_t list[8];
    
    n = LMS_GetDeviceList(list);
    return 0;
}

Thank you for any help,

  • Michael

including the header only gets you the list of function names for the compiler.
The error you’re getting is from the linker stage usr/bin/ld, you need to link the limesuite library symbols to your application.
For linking LimeSuiteNG you should add "-llimesuiteng" to your g++ arguments.
For linking the legacy LimeSuite "-lLimeSuite'

1 Like

Thank you!

Still a bit new to c/c++. linking to the library worked.