Friday, April 2, 2021

C++ Boost QA-tests linking issues

Hello all,

 

Longtime GNU Radio user, new member to the list here.

 

I can't get any C++ (Boost) QA tests to run in my OOTM. Specifically, I'm running into this linking error during the "make" step.

 

usr/bin/ld: CMakeFiles/time_triggers_qa_Related_Clocks.cc.dir/qa_Related_Clocks.cc.o: in function `test_add1::test_method()': qa_Related_Clocks.cc:(.text+0x4d): undefined reference to `gr::time_triggers::Related_Clocks::Related_Clocks()'

 

I'm running GNU Radio 3.8.1.0 as installed from Ubuntu 20.04 apt-get. The class being tested (Related_Clocks) has no issues compiling/linking/installing when used in blocks.

 

I've really been beating my head against this one, and any guidance would be greatly appreciated!

Thank you!


From lib/CMakeLists.txt

--------------------------------------

########################################################################
# Setup library
########################################################################
include(GrPlatform) #define LIB_SUFFIX

list(APPEND time_triggers_sources
    Related_Clocks.cc
    multi_response_1_impl.cc
)

[...............]

########################################################################
# Build and register unit test
########################################################################
include(GrTest)
list(APPEND test_time_triggers_sources
    qa_Related_Clocks.cc
)
list(APPEND GR_TEST_TARGET_DEPS gnuradio-time_triggers)
foreach(qa_file ${test_time_triggers_sources})
    GR_ADD_CPP_TEST("time_triggers_${qa_file}"
        ${CMAKE_CURRENT_SOURCE_DIR}/${qa_file}
    )
endforeach(qa_file)

From qa_Related_Clocks.cc:

-----------------------------------------

#ifdef HAVE_CONFIG_H
#include <config.h>

No comments:

Post a Comment