[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] GNU Radio and usrp_standard.h: No such file or di

From: Fabrizio Tappero
Subject: Re: [Discuss-gnuradio] GNU Radio and usrp_standard.h: No such file or directory
Date: Tue, 21 Sep 2010 16:20:26 +0200

Dear All,
I'd like to add a little piece of information about this problem.
if I try to compile the previously mentioned code with:
g++ usrp_test_c++.cpp -o testusrp `pkg-config --cflags usrp`
`pkg-config --libs usrp`

and I change:
 #include "usrp_standard.h"
 #include "usrp/usrp_standard.h"
 #include <stdio.h>

the code from here:

almost compile...
The solution to this problem does however implies lots of
modifications for the gcc line. Perhaps somebody who knows how the
"pkg-config" works could comment on it.
Also the source file that I am using is right in the gnuradio.org
site, put there as first example for people who begin using the gnu
radio package in C++. How come the stdio.h is not declared? also line:
urx->read(&bufr0, bufsize, &overrun);
seems to be wrong... Perhaps a better C++ example should be put there?

Just my very humble opinion/suggestion.

Best regards

On Mon, Sep 20, 2010 at 9:27 AM, Fabrizio Tappero
<address@hidden> wrote:
> Dear Eric,
> thank you for your help.
> Yes I have done "make install" and defined the various path using a
> "source .gnuradiorc" inside by .bashrc and in fact:
> ~$ more .gnuradiorc
> export PATH=$PATH:/media/lin_sw/gnuradio/current/bin
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/media/lin_sw/gnuradio/current/lib
> export 
> PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/media/lin_sw/gnuradio/current/lib/pkgconfig
> export 
> PYTHONPATH=$PYTHONPATH:/media/lin_sw/gnuradio/current/lib/python2.6/site-packages
> if I check the PKG_CONFIG_PATH as you suggest, this is what I get:
> ~$ echo $PKG_CONFIG_PATH
> :/media/lin_sw/gnuradio/current/lib/pkgconfig
> ~$ pkg-config --cflags usrp
> -I/media/lin_sw/gnuradio/3.3.0/include
> ~$ pkg-config --libs usrp
> -L/media/lin_sw/gnuradio/3.3.0/lib -lusrp -lusb
> Everything seems correct to me but probably something is not. If you
> have any more ideas please let me know.
> Best Regards,
> Fabrizio
> PS just to clarify, I am on a 32bit linux ubuntu machine with gnuradio
> installed in /media/lin_sw/gnuradio/3.3.0 and with a symbolic link
> /media/lin_sw/gnuradio/current point at the 3.3.0 folder.
> On Fri, Sep 17, 2010 at 10:24 PM, Eric Blossom <address@hidden> wrote:
>> On Fri, Sep 17, 2010 at 05:02:00PM +0200, Fabrizio Tappero wrote:
>>> hello,
>>> I am trying to compile this C++ file:
>>> http://gnuradio.org/redmine/wiki/1/UsrpFAQCppInterface
>>> by doing:
>>> g++ usrp_test_c++.cpp -o testusrp -lusrp
>>> and I get the following error:
>>> test_usrp_standard_rx.cc:28:39: error: usrp_standard.h: No such file
>>> or directory
>>> I am on a ubuntu 10.4 (32bit) system with gnuradio 3.3.0 properly (I
>>> guess) installer (from git) in /media/lin_sw/gnuradio/current
>>> from env I see that:
>>> LD_LIBRARY_PATH=/usr/lib/:/media/lin_sw/gnuradio/current/lib
>>> I do not seem to figure out what I am missing, can anybody please help.
>>> thanks a lot
>>> fabrizio
>>> PS "current" is actually a symbolic link to the folder 3.3.0 in the
>>> same location as suggested in here:
>>> http://wiki.frednet.org/index.php/GNU_Radio_Installation_Guide
>> Assuming you've done a "make install", pkg-config will tell you the
>> cflags and libs you need to use.  You'll need to have your
>> PKG_CONFIG_PATH set correctly for this to work.  If you installed into
>> the default prefix (/usr/local), the you'll need either:
>> $ export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
>>  or
>> $ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
>> Depending on whether you're on a 64-bit machine and/or what OS and
>> distribution you're using
>> On my x86_64 machine running Fedora 13:
>> $ echo $PKG_CONFIG_PATH
>> /usr/local/lib64/pkgconfig
>> $ pkg-config --cflags usrp
>> -I/usr/local/include
>> $ pkg-config --libs usrp
>> -L/usr/local/lib64 -lusrp -lusb
>> Eric

reply via email to

[Prev in Thread] Current Thread [Next in Thread]