Page 1 of 1

Geany can't find libbladerf

Posted: Tue Feb 03, 2015 2:47 pm
by rayrv9a
Hi,
A newbie with what will probably be a pretty silly question.

I am running Ubuntu 14.04 LTS and use Geany as my compiler. Previously I successfully installed the bladeRF PPA using the following commands:

$ sudo add-apt-repository ppa:bladerf/bladerf
$ sudo apt-get update
$ sudo apt-get install bladerf

I have written some C code that includes the lbbladeRF header file; ie #include <libbladeRF.h>

My code compiles but when I go to build and link it I get the following error:

/usr/bin/ld cannot find -libbladerf
collect2:error:ld returned 1 exit status

. . . even though I have used the Set Build Commands option in Geany as follows: cc -Wall -o "%e" "%f" -lm -llibbladerf

It is as if the sudo apt-get install bladerf command never built the library. Is there something else I need to be doing here?

Thanks,
Ray

Re: Geany can't find libbladerf

Posted: Tue Feb 03, 2015 3:48 pm
by jynik
Hi Ray,

It looks like you're linker flag is incorrect. That should be: -lbladeRF, not -libbladerf. The -l option already assumes there's a "lib" prefix. Also note the case-sensitivity.

Cheers,
Jon

Re: Geany can't find libbladerf

Posted: Wed Feb 04, 2015 6:28 am
by rayrv9a
Jon,

Many thanks. Your suggestion fixed the issue.

Regards,
Ray