discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] undefined reference error


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] undefined reference error
Date: Sat, 15 Jun 2019 14:20:15 -0400
User-agent: Cyrus-JMAP/3.1.6-663-gf46ad30-fmstable-20190607v1

Hi Tushar - Is the error when compiling your "receiver.cpp", or when linking? What is the complete error and command issued that generates this error? - MLD

On Sat, Jun 15, 2019, at 3:47 AM, tushar sharma wrote:

/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) /************************************/
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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