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
Geany can't find libbladerf
-
- Posts: 455
- Joined: Thu Jun 06, 2013 8:15 pm
Re: Geany can't find libbladerf
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
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
-
- Posts: 7
- Joined: Wed Sep 03, 2014 10:45 am
Re: Geany can't find libbladerf
Jon,
Many thanks. Your suggestion fixed the issue.
Regards,
Ray
Many thanks. Your suggestion fixed the issue.
Regards,
Ray