[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Interfacing to USRP2 with C++
From: |
Jonathan Peck |
Subject: |
Re: [Discuss-gnuradio] Interfacing to USRP2 with C++ |
Date: |
Wed, 4 Feb 2009 08:59:20 -0500 |
Eric,
Yes, I have looked at that header file. I wrote a small program to
try using the usrp2 class and tried to compile it without success.
Code usrp_demo.cc:
#include <usrp2/usrp2.h>
int main()
{
const char *interface = "eth0";
const char *mac_addr_str = "00:05:2c:85:30:a7";
usrp2::usrp2::sptr u2 = usrp2::usrp2::make(interface, mac_addr_str);
/* do stuff here */
return 0;
}
g++ Output:
address@hidden:~/usrp2-demo/usrp2-getdata$ g++ usrp2_demo.cc -o usrp2demo
-lusrp2
/usr/local/lib/libusrp2.so: undefined reference to
`gruel::sys_pri::usrp2_backend()'
/usr/local/lib/libusrp2.so: undefined reference to
`gruel::enable_realtime_scheduling(gruel::rt_sched_param)'
collect2: ld returned 1 exit status
Any idea on what I'm doing wrong?
-Jon
On Tue, Feb 3, 2009 at 4:58 PM, Eric Blossom <address@hidden> wrote:
> On Tue, Feb 03, 2009 at 04:29:12PM -0500, Jonathan Peck wrote:
>> Hi,
>> I am currently trying to write a C++ program that interfaces to
>> USRP2. I was able to successfully complete the tutorial found at
>> http://www.gnuradio.org/trac/wiki/UsrpFAQ/CppInterface for interfacing
>> to the USRP1 despite the example code being a little outdated. What
>> changes with interfacing with USRP2? Is there a similar tutorial for
>> the USRP2?
>>
>> Thanks in advance!
>> Jon Peck
>
> There's no tutorial.
>
> Have you looked at usrp2/host/include/usrp2/usrp2.h?
>
> Eric
>