Closed jwmelto closed 1 year ago
Could you either change or add an overload to the block make
function that passes std::string
? That's what the GRC code generator generates. I'm getting compilation errors with a generated flowgraph
Commit: 10ff67a should switch this back to std::string I believe my problem was not using "s in the GRC that was causing issues with C++ generation.
A couple more things. The C++ template needs
link: ['gnuradio::gnuradio-CyberRadio']
packages: ['gnuradio-CyberRadio']
The C++ code generation iterates over all the defined blocks and pulls out these values for use in generating the project/flowgraph CMakeLists.txt
file.
The values in the link
list are added as libraries for any projects that include the block. For reasons I cannot explain, simply having gnuradio-CyberRadio
doesn't work; it generates a link error -lgnuradio-CyberRadio not found
, even though libgnuradio-CyberRadio.so
is in my installed lib directory (and known to ldconfig
). However, if instead the CMake config is loaded, then the namespace-qualified target does work.
The packages
list drives the CMake package process (basically, generates find_package(<var>)
for each element in the list).
Combined, it finds the gnuradio-CyberRadio
package, and then adds the appropriate target to the generated CMakeLists.txt.
See: Commit 94a7d98 should resolve the above.
In the GNU Radio Companion (GRC), there is an option to generate code in either Python or C++, but the 3.10 YAML files lack the necessary support.
Specifically, for each block, add
and then (for example)
I'm still playing but these seem to be the minmal required changes to support C++ code generation. Of course, these portions need to be added for all supported blocks (
vita_udp_rx
was just chosen for illustration).