[Top][All Lists]

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

Re: [Discuss-gnuradio] Interfacing to USRP2 with C++

From: Johnathan Corgan
Subject: Re: [Discuss-gnuradio] Interfacing to USRP2 with C++
Date: Wed, 04 Feb 2009 06:57:02 -0800

On Wed, 2009-02-04 at 08:59 -0500, Jonathan Peck wrote:

> 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

You need to also link in the libgruel and omnithreads library.  An easy
way to do this is to use the pkg-config command.  To compile and link in
one step your single .cc file:

g++ -o usrp_demo `pkg-config --cflags --libs usrp2` usrp_demo.cc

The pkg-config utility will use our supplied configuration files and
create the proper compiler and linker flags for you.


reply via email to

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