discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] undefined reference error


From: tushar sharma
Subject: [Discuss-gnuradio] undefined reference error
Date: Sat, 15 Jun 2019 13:15:48 +0530

/home/msi52/src/applications/newpackage/receiver.cpp:-1: error: undefined reference to `gr::bb60c::source::make()'



I am trying to use one of the blocks from an OOT module in another package. But it gives me this undefined reference error on make.

I assume this pertains to linking of the OOT module code. So I have tried adding the OOT module to the find_package in Cmakelists of the new package and created a .pc for it to be found by pkg config module. But still the error remains.



#include <bb60c/source.h>  //header for my OOT module

gr::bb60c::source::sptr     src1;  //the pointer declared in the .h file of my new package. It gives no error

src1=gr::bb60c::source::make(1e9, -20, -1, -1, 2, 18e6, false, false, 0, 0); //the make for the block in .cc file of my package which gives this error

find_package(Gnuradio-bb60c REQUIRED) // find package in the Cmake lists

/***Contents of .pc file created*****/
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_BB60C bb60c)

FIND_PATH(
    BB60C_INCLUDE_DIRS
    NAMES bb60c/api.h
    HINTS $ENV{BB60C_DIR}/include
        ${PC_BB60C_INCLUDEDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/include
          /usr/local/include
          /usr/include
)

FIND_LIBRARY(
    BB60C_LIBRARIES
    NAMES gnuradio-bb60c
    HINTS $ENV{BB60C_DIR}/lib
        ${PC_BB60C_LIBDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/lib
          ${CMAKE_INSTALL_PREFIX}/lib64
          /usr/local/lib
          /usr/local/lib64
          /usr/lib
          /usr/lib64
)

INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(BB60C DEFAULT_MSG BB60C_LIBRARIES BB60C_INCLUDE_DIRS) MARK_AS_ADVANCED(BB60C_LIBRARIES BB60C_INCLUDE_DIRS) /************************************/

reply via email to

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