|
From: | Garver, Paul W |
Subject: | [Discuss-gnuradio] gr-trellis: Linking errors with viterbi_algorithm_combined() |
Date: | Mon, 5 Sep 2016 16:04:03 +0000 |
I am writing a block (pwg) in an OOT module (gr-research) which calls viterbi_algorithm_combined() in gr-trellis. I can’t seem to get the linker to cooperate. I’ll admit my C++ template skills are a bit rusty, so maybe this is a simple linking-against-a-template issue. Is there something different about linking against viterbi_algorithm_combined() compared with the typical OOT linking described in [1]? Thanks y’all.
Specifically, this is the cmake error:
bash-3.2$ make [ 4%] Building CXX object lib/CMakeFiles/gnuradio-research.dir/pwg_impl.cc.o /Users/pwg/git_repos/gr-research/lib/pwg_impl.cc:86:14: warning: enumeration value 'ST_ACKREP' not handled in switch [-Wswitch] switch(d_state){ ^ 1 warning generated. [ 9%] Linking CXX shared library libgnuradio-research.dylib Undefined symbols for architecture x86_64: "void gr::trellis::viterbi_algorithm_combined<float, char>(int, int, int, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<std::__1::vector<int, std::__1::allocator<int> >, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int> > > > const&, std::__1::vector<std::__1::vector<int, std::__1::allocator<int> >, std::__1::allocator<std::__1::vector<int, std::__1::allocator<int> > > > const&, int, int, int, int, std::__1::vector<float, std::__1::allocator<float> > const&, gr::digital::trellis_metric_type_t, float const*, char*)", referenced from: gr::research::pwg_impl::general_work(int, std::__1::vector<int, std::__1::allocator<int> >&, std::__1::vector<void const*, std::__1::allocator<void const*> >&, std::__1::vector<void*, std::__1::allocator<void*> >&) in pwg_impl.cc.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [lib/libgnuradio-research.1.0.0git.dylib] Error 1 make[1]: *** [lib/CMakeFiles/gnuradio-research.dir/all] Error 2 make: *** [all] Error 2
My block calls trellis::viterbi_algorithm_combined() from general_work(). The CMakeLists.txt in the root directory of the OOT module has TRELLIS and DIGITAL added as required components:
# Search for GNU Radio and its components and versions. Add any # components required to the list of GR_REQUIRED_COMPONENTS (in all # caps such as FILTER or FFT) and change the version to the minimum # API compatible version required. set(GR_REQUIRED_COMPONENTS RUNTIME TRELLIS DIGITAL) find_package(Gnuradio "3.7.2" REQUIRED) list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) include(GrVersion)
My understanding from [1] is that no further CMake edits should be required for the compiler to find the proper includes and libraries.
In gr-research/lib/pwg_impl.h has the following include (Shouldn’t be an include problem anyways…)
#include <gnuradio/trellis/core_algorithms.h>
Version Information: OS Version: MAC OS X 10.10.4 GR Version (gnuradio-config-info -v) v3.7-MacPorts-devel-git-e106376b(20160809), installed from macports C Compiler: llvm-gcc Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.4.0 Thread model: posix C++ Compiler llvm-g++ Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn) Target: x86_64-apple-darwin14.4.0 Thread model: posix
[1] http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig
|
[Prev in Thread] | Current Thread | [Next in Thread] |