Geany can't find libbladerf

Discussions related to embedded firmware, driver, and user mode application software development

Moderator: robert.ghilduta

Post Reply
rayrv9a
Posts: 7
Joined: Wed Sep 03, 2014 10:45 am

Geany can't find libbladerf

Post by rayrv9a » Tue Feb 03, 2015 2:47 pm

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

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: Geany can't find libbladerf

Post by jynik » Tue Feb 03, 2015 3:48 pm

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

rayrv9a
Posts: 7
Joined: Wed Sep 03, 2014 10:45 am

Re: Geany can't find libbladerf

Post by rayrv9a » Wed Feb 04, 2015 6:28 am

Jon,

Many thanks. Your suggestion fixed the issue.

Regards,
Ray

Post Reply