I'm currently implementing a GUI interface for a very small GNU Radio application. The application will simply connect to a USRP device, receive some IQ samples and forward them through a TCP socket. Following the gqrx project file example, I was able to run some example gnuradio blocks (the dial tone example from gr-analog). Problems started when I tried to include UHD/USRP blocks into the project. Basically, Qt creator report the following error:
/usr/local/lib/libgnuradio-uhd.so:-1: error: undefined reference to `uhd::usrp::multi_usrp::ALL_MBOARDS
The .pro file configured as shown below:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = USRPDialog
TEMPLATE = app
SOURCES += main.cpp \
usrpdialog.cpp
HEADERS += \
usrpdialog.h \
ui_sdrdialog.h
FORMS += \
sdrdialog.ui
CONFIG += c++11
CONFIG += link_pkgconfig
PKGCONFIG += gnuradio-analog \
gnuradio-blocks \
gnuradio-digital \
gnuradio-filter \
gnuradio-fft \
gnuradio-runtime\
gnuradio-uhd
LIBS += -lboost_system$$BOOST_SUFFIX -lboost_program_options$$BOOST_SUFFIX -lboost_thread$$BOOST_SUFFIX
LIBS += -luhd -lgnuradio-uhd
And this is the function that calls the uhd::usrp_source object
void USRPDialog::createFlowgraph()
{
tb = gr::make_top_block("usrp");
d_tcpSource = gr::blocks::tcp_server_sink::make(sizeof(gr_complex),"127.0.0.1",d_rxTCPPort,true);
d_usrpSource = gr::uhd::usrp_source::make(uhd::device_addr_t(ipAddressLineEdit->text().toStdString()),
uhd::stream_args_t("fc32"));
//Connecting blocks
tb->connect(d_usrpSource,0,d_tcpSource,0);
tb->start();
}
UHD is installed in my system (GNU Radio flowgraphs in my system can connect to USRP devices without any problem). Could anyone shed some light as to why this problem occurs?
Thanks in advance.